how do i make many different height boxes?

hi, i’m currently trying to use the array modifier to make many straight boxes with different heights

however, with the displacement modifier, the top of the boxes are not flat, as the modifier applies to each vertices

i wanted to use a displacement modifier on a empty of a hook modifier, so that the top faces stays flat, but the height changes…

but i can’t seem to do it

please help, thankyou

For example: a box bottom 4 vertices Shrinkwrapped to a plane and Array modifier using empty for translations.

My preferred way is to bring in a Grid, Inset individual faces (I-key twice) and Shift-H to hide all but selected faces.
Select one face in a middle and using Proportional edit Random mode and Individual Pivots scale Z as needed (or rather where it gets too ugly, which is i’d like to ask for comments later). Switch off Proportional edit and scale Z to 0. Alt-H to unhide. Done.

What i’d like to ask is why when selection is Faces proportional random effects individual vertices, not faces. Is this a feature, expected behavior? I’d assume since i am free to choose between verts, edges and faces this should be considered as an element for Proportional edit.