There are two homeless populations: voluntary and involuntary. It makes sense to speak of low-income housing only for the second group. The first, for many reasons including mental illness, will not undergo voluntary substance abstinence, making their housing among others impossible and unwanted (by many of them, too). 
Vastly expanding the Mission might be the best option; the other would be to construct quonset huts with gender-separated sleeping areas w/communal meals and baths. Electronic services also could be provided, making camping out in the public library an unnecessary activity.