Computes the intersection of arrays