It looks like the Elvis operator doesn't work quite right with function return values that are arrays. Repro:
This errors with:
It works as expected on ColdFusion.
My use case is that the result of a .reduce() call generally returns an array, but it might reduce down to an empty array, in which case I want to default the ultimate return value to an empty array, rather than the first item of the reduction.
Just ran into this in 4.5.2.018
Just to check, if you say this instead, does it work on Lucee or still fail:
result = isNull( f() ) ? f() : "default";
(and, yes, I know that calls f twice but I want to check whether the issue is how ?: behaves or how the  behaves here)
I'm actually really surprised this works in ACF (and my personal opinion is that it should not – so I view this as a bug in ACF, not Lucee).
Testing via the CommandBox REPL, isNull( f() ) throws the same error (Element at position  doesn't exist in array). It seems at a first look that isNull checks will work on structs if you try and access a nonexistent key either via dot notation or "array" notation. isNull checks do not seem to work on actual arrays trying to access a non-existent index.
That's what I expected – and why I think ACF's behavior is wrong. With a struct you can expect a key to either be present or not (and some languages will not throw an error on myStruct[nonExistentKey], they'll just return some sort of null). With an array, an index is either in bounds (and you'll get a value back) or out of bounds (and you'll get an error). In general, languages treat structs and arrays very differently.