How to tile different textures in array modifer

Continuing from this topic How would you make an arbitrarily curved sidewalk? - #2 by 2WayStudios

the suggestion worked mesh-wise, but not material-wise. Here I attached an image since it more easily explains the problem

The first tile is UV-unwrapped with UV coordinates used to map the noise and etc into the material output.

The first problem in this approach is that the exact same image is duplicated in each tile which is already unrealistic.

The second problem as you can see is that each subsequent image is distorted by the curve of the mesh.

How can this be avoided? How can each tile generated by the array be treated as its own unique tile without permanently applying the modifier? Or perhaps, how can the texture be mapped using UV coordinates so that the thin sides aren’t distorted, but so that the texture is applied globally or object-wise so that it continues from tile to tile or is otherwise completely distinct?

If only there was some way to order materials and modifiers in relation to each other.

Use a UV offset in your array modifier. Like, use an offset of 1.0 in the U, then do U modulo 1 to see what the tile count is. Use that count, interpreted by whatever math you want, to mixRGB between multiple textures that are accessed in “tiling” border mode.

Give it a UV project modifier after the array.