Create a section of 3D geometry that you want to turn into a displacement map, not too large a section, treat it as a tile in the same way that you would create a conventional pattern image.
This example is based on a diagonally arrayed perforated sheet…