That shows a disturbing lack of understanding and empathy. A lot of people who you term "bad" homeless started out "good" but saw their mental state severely deteriorate as a consequence of being homeless.
And even for people for whom that's not the case, the solution is to find them help for their mental health issues. Yes, a part of that might involve involuntary commitment to an institution (though CA has lost its ability to do that for the most part), but... damn, "wall these people off from the rest of society"? That's pretty heartless.