It is as much a bill of attainder to forcefully detain someone because they might commit a crime, as it is to take their property for the same reason.
However, there are people who have consistently exhibited violent behaviour, who have for reasons which are mental health related injured others, not necessarily out of malice, or as part of another crime, but because of their behavioural problems. Some are violent enough that inpatient treatment may be indicated. (I'm no expert, but there are people out there you just don't want roaming loose, for demonstrable reasons.) Patterns of escalating violence may be evident. Do you wait until they graduate to the next level, or do you try to stop the escalation? I think there could be solid criteria drawn up which would be acceptable to everyone, not just based on he said/she said and some hurt feelings or wild statement uttered in passion.
There is a point where people have exhibited behaviour which is threatening, where people have been injured, and where there has been stated clear intent to do others harm, but it is usually best seen in retrospect.
What I have noticed in Texas, which may not be the case everywhere, is what happens to those that can't afford private psychiatric care.
They will get help, get meds, become stable, and then be dropped off in the nearest city closest to where they live.
They are told follow up with a doctor at a certain date and time.
Next, before this happens, they run out of meds, and are stuck downtown somewhere in unfamiliar surroundings, and all that treatment before is gone out the window.
Next thing you know, they're homeless, on the street.
My thing is not just treating them in a facility and letting them go, but to follow up after they have been released.
(1) Did the goal of treating and releasing them work? In these cases, no?
(2) Was it necessary to put them in a facility in the first place, or could it have been done via outpatient, even with visits to the person's home, if necessary?
I don't know, maybe.
(3) Follow up.