Change the structure to store RangePair from list to array.