input: Below is an instruction that describes a task. Write a response that appropriately completes the request.
  
  ### Instruction:
  Create a Python program to filter an array by a given criteria.
  
  ### Input:
  criteria = x % 5 == 0
  array = [1, 2, 5, 10, 15, 20, 25, 30]
  
  ### Output:
  def filter_array(array, criteria):
      """
      Filter an array by a given criteria.
      >>> filter_array([1, 2, 5, 10, 15, 20, 25, 30], lambda x: x % 5 == 0)
      [5, 10, 15, 20, 25, 30]
      """
      filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      return filtered_array
  
  criteria = lambda x: x % 5 == 0
  result = filter_array(array, criteria)
  print(result) # Outputs [5, 10, 15, 20, 25, 30]
output:     
      filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      return filtered_array
  