If someone isn't suitable to be back out in society without committing the same crime again, keep them in prison while treating them mentally until they're stable enough not to; if they never reach that point, don't release them. Imo, they need mental help, not physical punishment. Their dick doesn't make the decision to rape someone, their mind does.