atomic.Pointer
A generic pointer from sync/atomic whose Load and Store are safe across goroutines. Build a new immutable value off to the side, then Store it; readers that already loaded the old value keep using it.
Minimal example
var cur atomic.Pointer[Index]
cur.Store(next)
idx := cur.Load()