If you need to use two arrays, you can solve this with zip, filterand mapas follows:
let hbiCompleteArray = [true, true, true, true, false, true, true, false, false]
let hbiScoreArray = [12, 12, 12, 12, 3, 13, 13, 2, 2]
let result = zip(hbiCompleteArray, hbiScoreArray).filter { $0.0 }.map { $1 }
print(result)
gives:
[12, 12, 12, 12, 13, 13]
: zip ( (Bool, Int)), filter { $0.0 } true booleans, map Int.