What are you even talking about? There used to be insane asylums. Where crazy people who would not get better would go to become permanent wards of the State. They were not prisons, nor were they part of prisons, though some prisons famously DID have psyche wards where horrific shit was done to patients.
What there is today is inpatient shit and padded cells in prisons, and there is no, "Your brain is broke, you're now property of the State."
This shit is covered extensively in K-12 education in the US. What are you getting at here? Here, give Wikipedia a shot:
https://en.wikipedia.org/wiki/DeinstitutionalisationI don't know if bringing back insane asylums is good or not. I'd rather simply reinstitute the death penalty, and those who're so mentally broken there's no hope of fixing them, AND have proven themselves a danger to society are simply executed.
You don't deal with a mad dog by giving them love and cuddles. You deal with a mad dog by killing the mad dog. It's the only way to insure the safety of your family and other animals.
I mean, within an asylum there would exist a solitary confinement ward for the most violent patients. When we're talking about the most unhinged violent insane murderers where rehabilitation is an immense task, euthanization (or lobotomies which they used to do) is the most merciful option. But there exists the masses of patients who are largely non-violent, just mildly violent.