OK. So here's how this works. No MEL scripting was involved.
First, I opened Photoshop and made a little 20x20 pixel file. I filled it with black and used the Noise function to randomize the pixels. Then, I used Nearest Neighbor resampling to size the thing up to 1k by 1k. Here's a sized-down version of the image that resulted...