Some people need a hand to get back on their feet. Some people need a small, safe space just for them and their stuff (voluntary homelessness, broadly speaking; tiny homes or more dense concepts in urban areas work here), some people need to be committed (I know some folks like this both in a clinical setting, as well as a working farm in New England operated just for this need). These statements are the easy part, the hardest part is implementation.
Affordable housing is of course key to broad housing security for those of sound mind and economics who desire to be housed.