When I grew up we had state mental institutes that we could use to put away the crazies. The reason why they were closed across the country was the staff got caught abusing these people. So over time all of the crazies hit the streets and filled our jails.
The solution here is so doable. We reopen these mental hospitals and start to get mentally ill people off the streets and out of our jails. We fill these buildings with cameras to curve any abuse and our nation starts to heal. It is that simple, the reason we closed these places does not exist anymore. We have cameras now.