This question is inspired by a premise from the video game Batman: Arkham City, in which a portion of Gotham City has been closed down by the public to be reserved for prisoners from such places as Arkham Asylum and Blackgate Penitentiary. Unfortunately, that was only a temporary environment, as the real agenda, codenamed "Protocol 10", was to cull Gotham's excessive population.
The context in this scenario is different. In the near-future, some global or near-global disaster has forced the construction of multiple Shimizu Megacity Pyramids, Ultima Towers and X-Seeds 4000, arcological structures that are supposed to support great populations with minimal area space. Which means that any of the old cities, like New York, Tokyo, Beijing, Sydney, Houston, Detroit, Chicago, London and many others, would be viewed as undesirable by the public, thus converting these old cities from public settlements to extra-extra-large prison colonies. Provided that extra security measures be done--like filling the outside spaces with walls--could converting a large, metropolitan complex into a prison be feasible, much less wise?
For further clarification, physical feasibility is the only target in this question. Whatever happens inside--gang wars, survival struggles, other kinds of social unrest--is not the point.