def selectArea(arr, x1, y1, x2, y2):
  """Selects a specified area from a 2D array and fills a 1D arr with the values"""

  areaArr = []
  for row in range(y1, y2):
    for col in range(x1, x2):
      areaArr.append(arr[row][col])
  
  return areaArr