There is a...community center? Or something like that, not quite a squat, dunno what exactly, but they let people stay on the roof for free, or chip in a few bucks and stay indoors. It's abuot 2km from Khao San road in BKK, called "The overstay". Might be worth checking out, I hung out a bit there but it was pretty empty while I was there.
Advice: Rent a bike in Chiang mai, buy the good riders map (everyone knows what I mean there), and go on day trips to get used to them. Then just go nuts in the hills for a fe days, having fun getting lost, etc. it's a blast.
Pai is an hour or two north west of Chiang mai, it's a hippy chill town with a few old hippies. If you head up there look up a bartender named "bock" in the center of town, he'll hook you up with nearly anything.
DONT DONT DONT carry herb across road checkpoints. Sometimes they have dogs, totally randomly, and you can get seriously fucked. It's not worth it. Besides, in all these little towns, just find a backpacker bar, ask the bartender, and you'll get a 500baht pack.