Having no housing precludes keeping a proper medication schedule, record keeping, and a whole list of other things.
There’s very little about mental illness that permanently frustrates sleeping indoors. Transitional housing, housing with shared bathing and kitchen facilities already exist.