The solution is to reverse the court cases that gave us the “deinstitutionalization” of the mentally ill and hopelessly addicted indigent.
Being locked up is a powerful, possibly the most powerful, incentive to get clean and stay clean or to take your meds.
Until that happens, we are just rearranging the deck chairs on the Titanic.
The courts had almost nothing to do with ending asylum for the seriously mentally ill.
It was Congress, encouraged by JFK, who enacted a presumption for treatment in nonexistent community facilities, and Reagan who finished the job by executive order.
When judges release seriously mentally ill people from confinement, they are mostly following the law your representatives made.