(There are some questions about time-efficient sparse arrays but I am looking for memory efficiency.)
I need the equivalent of a List or
List
I would try with trove collections, there is TIntObjectMap which can work for your intents.