Connecting obj translation to a map.. how?

Let's say I have 64 cubes, arranged side by side in a neat 8x8 cube array.

I want to create a ramp (2d texture) that goes from black (top) to white (bottom) and then connect the (grey) values of this ramp to the corresponding individual Y translations of the array of cubes, so the 8 cubes along the top of the array have a Y translation of 0 (black) and the cubes along the bottom have a Y translation of 1 (white) (while all the other cubes in between gradiate upwards from 0 to 1)

then, if I add some noise to my ramp map, all the cubes will bubble about (up and down) as the correspondinging "pixels" in the ramp change colour...

is this easy to do in Maya? or a nightmare of weird node connections?

could someone tell me how I would do this or where to start looking if it's not that straightforward? thanks.

:nathaN

use a shading switch!