Not quite true in California - being "gravely disabled" also justifies involuntary detainment and treatment:
"A condition in which a person, as a result of a mental health disorder, is unable to provide for his or her basic personal needs for food, clothing, or shelter."
In reality though, the lack of funding for such people means that only the most severe are treated under this category. What's required is the funding and political will to enforce it, the necessary legal structure is already in place.
https://leginfo.legislature.ca.gov/faces/codes_displaySectio...