Shaders are cool - I think? I wanted to use them for generative animations , but (maybe I have it wrong) I could not see a way to store state with each pixel. I wanted the color of the pixels to be a view onto some underlying state at that pixel location - and update that state in a shader manner, so parallel and multi-threaded, with each state step depending only on the state of its neighbors - a generalized pixel if you will.
Sounds like you need a multi-pass shader. As an example, you can store state in one pass, apply operations in another pass, and render in the last pass.