It seems to me that paranoia and feelings of persecution would go hand in hand with feeling trapped. With no open spaces except those surrounded by walls, that feeling might well be enhanced, but I do not think the feeling is strictly a result of physical barriers.
Perhaps I am projecting, but I am most comfortable with small groups of people I know. Like I believe most people react to those they do not know, there is necessarily a stage of feeling people out, finding out who they are and what they believe in, how they react to stimuli, and whom you can count on. That opportunity might be overwhelmed by the press of people you have no time to get to know, surrounding you, causing unease, and in more extreme cases, serious anxiety.
Knowing full well that lurking somewhere in that press of people you don't know there are predators, would contribute to such feelings, and unless you are someone who can just ignore all the others (a potentially dangerous state), paranoia might just be a defense mechanism that enables you to survive or avoid encounters with undesirable elements..
It would not take long, listening to the news to attribute and equate the presence of people you don't know, especially those fitting certain profiles, with threats to your well being. Being forced by social convention to act as if that is not the case, your public and private persona might vary greatly, in effect nudging you toward a degree of duality in life that could simply continue beyond putting on a happy face, or pretending to be unapproachable, a threat yourself to keep those who might be a danger to you at bay. which would only exacerbate a problem that requires genuine interaction with a friendly face.
Isolation is fine in small doses, it gives us time to think, and lets us grow closer to God, but you can get too much of a good thing, in the sense that no one is an island, and without interaction with others we tend, as humans, to spin off into mental realms beyond what we consider normal. In effect, the more people we are surrounded by past an optimum for interaction, the more isolated we will feel, and the more steps we take to enforce that isolation in a quest for security and sanity. It is a vicious circle.
For me, though, I like the peace of open spaces, as much as I crave human contact. I can be perfectly content to be alone, so long as I can balance that with time spent with friends and loved ones. I can't imagine spending time surrounded by people and yet not feeling loved, and I think cities may foster that feeling in all too many who came there seeking stimulation, only to isolate themselves socially, and subliminally feeling trapped by the physical environment, even though that is more an ambiance created by the constant feeling of being surrounded.
While some may genuinely thrive in that environment and take comfort in those constraints, It isn't for me.