Raymarching mean you step through many pixels to resolve, accessing pixel is accessing memory, and it also mean you would jump around in memory position, hence random access.
What you describe is raycasting, is solve it mathematically, hence interior shader, it infer from a simple shape, find the virtual position then you sample accordingly. I’m exploring stuff here, Infinite parallax hair volume using wrapping grid tracing (attempt)
Or Relief function shader for high depth and tiling it start to look like grass.
But try interior shading too similarly with high depth and close wall in one axis, though raycasting techniques are limited to primitive shapes, your grass will be boxy most of the time, which you can try to alleviate by mixing multiple casting, picking the closest result and texture trickery, don’t forget to blend with the scene by writing the virtual z to zbuffer.