We basically did that for several decades, and we now have more people in prison than the rest of the world
combined, as well as a much larger population of second class citizens (try to get a job with a criminal record!). Many of them did not commit any crime at all. And all of the second-order effects that come from this carceral worldview: missing parents, broken families, generational poverty, and for those directly involved, tremendous suffering.
And you can look for yourself: our crime rates are comparable to, in many cases worse than, any other place that superficially resembles ours.
The way your comment is written makes it seem like you are sympathetic to this idea.
There is no "out of society." They're still here, we still have to deal with them. Not only with them, but also with the machine that we built to coerce them into living the way they live. In exactly the same way you have to deal with me, and I have to deal with you, and we both need to deal with seeing a vending machine vandalized. The question is, how do we deal with that?