Selects a subset of the array to return an array with only the elements that match the filter condition.