Compute the union and intersection of two arrays -- Ebay