It could be translated to `IndexSet(array.enumerated().filter { true }.map { $0.offset })`. http://swiftify.me/qb8r27