What I did in Ontario--and still do--was have special prisons for programs. So for offenders of any kind who volunteer for programs, they go to those prisons. The harassment of sexual offenders in those prisons is very low, because anybody who harasses a sexual offender knows they're on the next bus to what the prisoners call the gladiator prison.
On February 9th, 2011. See this statement in context.