Random material offset (as official, literal material index offset) uses a different technique, possible with geometry nodes, but the problem you reference doesn't require random material offset, and most things you would use material offset for can be done in nodes, so I'm skipping that part of the question.
For random, per-array-object rotation, we can use UV to create a per-object random value, and then rotate our mapping vectors by that random value:
I've collapsed the entire UV map to a single point (by scaling it to zero). Then in each array modifier, I offset that UV. Now, I can use the UV as a lookup on a noise texture, and use the output of that noise texture to remap my object space coordinates. Because each array instance has the same UV throughout it, each array instance will get the exact same rotation.
This relies on your example of using object coordinates for your main material, as Blender's array modifier UV offset cannot be set individually for each array instance. If you need to use UV for other purposes, this might not work directly (it's doable, but more complex/more work.)