We tried "mental asylums". They were inhumane disasters which often made their inmates worse, and there's no reason think they'll be any better a second time around.
Confining people, en masse, indefinitely or for very long periods, due either to mental illness or addiction is unreasonable and inhumane.
However, allowing someone to decline treatment, and become homeless, risking disease, injury, cold, heat, poor hygiene, lack of nutrition, all while making life less pleasant for others, and in some cases dangerous as well is equally unreasonable and inhumane.
There needs to be a balance.
If someone can remain housed, and not a nuisance or threat to others the balance swings strongly to their remaining free, though, treatment should be strongly encouraged.
But if you can't maintain housing, or minimal self-care, or self-awareness and are putting your health if not life at risk, treatment is not and cannot be an option.
It can certainly be voluntary and outpatient for those demonstrating a willingness and ability to adhere to such. But for others, it means compulsory in patient treatment.
Such treatment should always be as compassionate and humane as possible, and providing people are low risk to harm others, we should always err on the side of restoring people's freedom at the earliest opportunity (though not to send them back to the streets as homeless persons, but rather being released to supportive care or independent living housing as appropriate.)