Merge "Replace HashMap with ArrayMap to remove unnecessary allocations"