There is a thing called shared memory, but it’s tricky to implement and limited in size.
You can also access global memory, but it’s slow because then you have to copy data between GPU and CPU.
Even if you managed to do so, you will have racing issue to deal with, where some threads might finished calculation while others are still working.
The safest way to manage other thread’s memory in my understanding is to use synchronization which you wait until all threads are completed and collect data from GPU to CPU, you then post process data in CPU and input the updated data into GPU again for next iteration or “frame”. But I am not sure how you can do all those directly in GPU without passing through CPU.
That said, it might be possible depending on the algorithm and how you implement your buffer.
But again, I might be entirely wrong🥲…