Quite strange. But I got the problem.
The first version a .+= (true) ? [1,1,1] : 0 works. But a .+ (true) ? [1,1,1] : 0 or c = a .+ (true) ? [1,1,1] : 0 won’t work. I typed the problematic one.
In a .+ (true) ? [1,1,1] : 0 you are trying first to sum a boolean number with a number to get a boolean value, from there you have an error.
It is just an issue about precedences, this work as expected: a .+ ((true) ? [1,1,1] : 0)