Reminds me of the data structures in this markdown library https://github.com/markdown-it/markdown-it/blob/master/docs/...
The author hand waves away the possibility that there could be memory locality performance benefits by using arrays in JS but my hunch is that there is something in that. I know the react code base for example went for a monomorphic Object structure to represent components to leverage inline caching of hidden classes.