Why not just store these in the same data structure?

I.e. instead of data = dataHistory.at(time), aux = auxDataHistory.at(time), just do obj = history.at(time), data = obj.data, aux = obj.aux.

Makes sure the two are always in sync when they should be