The solution is New Deal style CCC camps, where their drug and mental problems at least can be supervised and dealt with - yes, in the desert. Enforce vagrancy laws.
Thank you for that bit of ignored history - many of the CCC camps were just that (despite the mythology built around them).