@kellnett
The next solution could be using the current spine attachment points (which we have as 3D coordinates) as the origin of a sphere with a radius equal to the maximum spine length and generate a random 3D coordinate within that spherical volume for each attachment point along the dendrite.
This could possibly help control for any biological process that determines where the spines begin to form (since my data do show some degree of attachment point clustering)