I live in a major city that is constantly described as having an epidemic of homeless people. I am far more annoyed by delinquent, housed teenagers than I am of the homeless population here. And more people die from reckless drivers than are murdered by insane homeless people-- in fact, a little girl was killed in a hit and run this year a few streets from me, and 0 murders by insane homeless people have happened in the meantime.
I'm pointing out that you must absolutely contend with the fact that marginalized people have historically been labeled mentally ill when they fight for equality, and that asylums have historically been used as a tool for this purpose. If your concern is to address homeless insane people, one of the major causes of insanity is being homeless for more than a few months, and yet our homeless shelters are still under-resourced and we are still creating more homeless people by seeing housing as an investment that must always grow, pricing out more and more people.
If anything, I am pointing out we must address the "false positive" issue, where the population of people who are under threat of being institutionalized as insane even though they are just a marginalized person reasonably reacting to their own oppression might be greater than the insane homeless we want to address. And that "we just won't do that because regulation" is a straight up delusional belief, with zero basis in actual reality, and is more or less saying you hate homeless people more than you care about marginalized people losing their rights.