Ch. 21, Generics, Silver Challange

func findAll<T: Equatable>(_ array: [T], _ element: T) -> [Int] {
  var findIndexes = [Int]()
  
  for (index, item) in array.enumerated() {
    if element == item {
      findIndexes.append(index)
    }
  }
  
  return findIndexes
}