Inpatient, long term, residential, involuntary commitment essentially doesn't exist in the U.S. any longer, because of the ways our health care system has changed sine the 1970s, and because of de-institutionalization.
What we CAN focus on developing and improving is better and more streamlined outpatient involuntary commitment. Many people have never even heard of this as a treatment option. Think of it as a more intensive "parole/ probation" experience. Certainly part of the contract for supervision includes no access to weapons, and not living in or with others who have lawful access to weapons.
If someone like Adam Lanza had been subject to
outpatient involuntary commitment at age 18 over the "sheltering objections" of Nancy Lanza, the 26 children and educators at Sandy Hook would still be alive, IMO. Nancy Lanza was not objective or experienced enough to provide competent supervision and care for Adam Lanza, who had multiple lifelong social and functional disabilities that rendered him incompetent. IMO.
https://en.wikipedia.org/wiki/Outpatient_commitment