- You can do it vectorized using randperm (assign the X to the first numX elements, then assign Y to the next numY elements, then use randperm to scramble the order), or
- you can do it brute force using a for loop to place the x value and another loop to place the Y value, but only in the location if the value is a nan (not an X).