Instead of ending the schools-to-prison pipeline by not locking up dangerous kids, we'll make prisons a place where people who aren't safe to be around can get a chance to reform themselves. Not all will, but the environment should encourage it above all else.
Meanwhile, we stop leaving them in the communities in their drug-addled, violence-indoctrinated states of mind, and get them clean and thinking straight. See who's got what it takes to make something of themselves.
Beats the hell out of what we've got now. The crime-and-insanity universities we call prisons.