Ensured uniqueness with union. Tested for array sparsity on tuples and lists.