Random generation of galaxy positions within a HEALPix patch