Gosh, what a clever idea. 
And how much space around these beds will be required to keep the hopelessly psychotic or criminally anti-social from killing each other?
Killings are tough for the well-meaning but weak in the stomach. Things tend to close down after bloodshed.
It's an ugly problem with no pretty solutions, no matter how many beds are thrown at it. 
I don't think people can really be blamed for giving up apparently hopeless situations and tending to their own lives.