Edited to be more clear.
Create a distribution of operations, so that each box has an integer that represents the index of an operation list. For instance,
0 -> Move Z somehow.
1 -> Scale XY somehow.
2 -> Subdivide and Move Z somehow the children boxes.
3 -> Do nothing.
So, each box must have an integer from 0 to 3, maybe you can sample them using noise or interference or multiscale distributions to approximate the look of that image. Or create biomes if you feel more inspired. Once that, you can filter the boxes to run its specific operation.
If you want to have a bunch of random sizes, you could use quadtree and a set of random points as the way to subdivide the boxes.
The Z of each cell would be based on the surface.
You could then randomise offsets dependent on size of the box.