But most are no threat to society. Important to note that; a majority of criminals may have some degree of mental illness or personality disorder, but most people with mental illness are not going to commit crimes.
Ideally, there would be more residential treatment programs and more affordable residential treatment programs but I have no clue where that funding could come from.