Array filter utility