Use zip feature to iterate over 2 arrays in the single loop.