The only way to get them into housing is press gangs. Most like being on the streets. When they are in housing, they often destroy it and turn the local neighborhood into a warzone and/or red light district.
A mandatory treatment program might work. I also like what @JSC described - a quick judicial process for dealers followed by hangings. We can copy the weight/drop chart from Singapore's hangman.
Sure, involuntary containment is the authoritarian side of this free housing free drugs things, no wandering around while high/low.
Those wanting to get better have a different path.
Why treat dealers differently than the manufactures....the knowledge part seems more like a point of focus to me.