This matches the behaviour of the Pluto rewrite Eris, and avoids
casting the integer indices to void *.
I verified this code by running this method in parallel with the current
lightuserdata/void* approach and asserting the retrieved objects were
identical when loading a savegame.