Compute the difference between input arrays