Wrapper for a PHP array to add some set comprehension logic