How does that private prison in The Flash work?
It works like any other prison except we skip the judge/jury stuff. It is illegal if it took to curt but unethical? I don't think so.
Barry is such a lawful and moral person; why isn't he concerned when they put people into an estimated 1m² big cell without anything in it?
So should he leave mass ...
As indicated in the comments, it's the speedforce. It's a Macguffin that's used to move the plot forward.
When we're talking superheroes and movies (or comics) you just have to suspend disbelief because the bulk of what happens is just not possible. If you think about it, without the Macguffin, Barry would probably burn to a crisp the first time he ran at ...
To me it seemed that the prison boss had some knowledge about speedster and has been well prepared. At least he was able to build a cell which Flash couldnt't vibe through.
Maybe he got help of Amunet Black, who knows pretty well about metas and their powers.
On the other side, I think Green Arrow was missing this kind of knowledge.