And addiction is a large component of homelessness, but if you're still addicted you're obviously not going to spend much time in a place where you have to go cold turkey to enter.
So, my ( probably naive ) suggestion would be to allow drugs and alcohol in the shelters, hopefully giving the residents long enough of a chance to receive some help. No it's just a revolving door that doesn't appear to be helping anyone.
Universal basic income too. :-)