Use Hash construction and map the array by pairs