set operations implemented with arrays