> I've always found it a bit ironic when people intending to advocate for better treatment of the homeless proclaim that homeless shelters are havens of violence
This is the equivalent of suggesting that there is irony in the position that one can support animal welfare but still be against the position of beating animals with a stick (rather than an iron bar).
Homeless shelters can be violent. They are certainly full of people with (often untreated) mental illnesses. They are also not a solution to homelessness, but rather a solution to the problem of people sleeping on the street.
Solutions to homelessness often require providing permanent housing to people whom you may not like and who you, personally, may believe do not deserve a "free" apartment or house. It involves giving people a permanent foundation on which they can start to build a post-homelessness life. This is why it is never a popular solution - what I find ironic is that voters who want to "solve" homelessness never actually start with the simplest solution, giving away secure and dignified housing.
A real solution involves notions of security, safety, etc and often requires homeless people, particularly those who have lived homeless for a long time, to unlearn those strategies they have employed in order to survive. Shelters do not provide this type of support.