like base::sets tools but keeps duplicate elements.