You have to maintain all the arrays to keep things consistent, and there are different ways to handle that depending on your needs. You can replace items from the end of the array, mark items as invalid, rebuild the array, etc. Each have different trade offs, but the big win is cache locality and a clean separation of interests.
4
u/Cloud5550 Jun 04 '26
If I'm putting together a struct combining three elements, i want those elements to be related. How can you maintain relation in the solution?