Particles conform to shape of geometry

Is there a way to make particles conform to the shape of geometry? For example, could I use particles to simulate brain synapses and have them conform to the shape of a brain model?