This one works even with scrambled indices.

[![Node Setup][1]][1]

[<img src="https://blend-exchange.com/embedImage.png?bid=3a8q4xgb" />](https://blend-exchange.com/b/3a8q4xgb/)

It uses, what I call the *Array Pattern*. I already used this technique in the thread [Select a subset of points in geometry nodes?](https://blender.stackexchange.com/questions/261622/select-a-subset-of-points-in-geometry-nodes) and will explain it related to this solution soon here...

  [1]: https://i.sstatic.net/Bwxfq.png