Changed toArray in EquaSet and SortedEquaSet to return Array[T].