Typically for this I’ve done some wrapper type around a vector storage for the node data (a wish.com arena, if you will). Links are just some abstraction around indices.
It’s kind of annoying to write initially, but it was easier than learning unsafe stuff. To do it correctly & most efficiently though, one would likely need unsafe code.
For some further mind fuckery on the subject, I highly recommend this video on the subject: https://www.youtube.com/watch?v=DkH1citHtgs. Dude never misses in interesting content.