input: Write a function to filter an array by a given criteria. The function should take two arguments: an array and a criteria function. It should iterate through the array, check each value against the criteria function, and return a new list of values that meet the criteria.
  def filter_array(array, criteria):
   # Create an empty list
   filtered_array = []
   # Iterate through the array
   for value in array:
    # Check if it matches the criteria
    if criteria(value):
     # If it matches, add it to the list
     filtered_array.append(value)
  
   # Return the filtered array
   return filtered_array
  
  assert filter_array([1, 2, 5, 10, 15, 20, 25, 30], lambda x: x % 5 == 0) == [5, 10, 15, 20, 25, 30]
  assert filter_array([2, 3, 4, 6, 7, 8, 9, 11], lambda x: x % 5 == 0) == []
  assert filter_array([-5, 0, 5, 10, 15, 20], lambda x: x % 5 == 0) == [-5, 0, 5, 10, 15, 20]
  assert filter_array([], lambda x: x % 5 == 0) == []
  assert filter_array([1, 2, 3, 4, 5], lambda x: x % 2 == 0) == [2, 4]
output: def filter_array(array, criteria):
   filtered_array = []
   for value in array:
    if criteria(value):
     filtered_array.append(value)
   return filtered_array