Finding pairs with difference in arrays