Using `reduce_sum` with `ordered_logistic`

Here is what I don’t understand:

In the original graded response model above alpha is passed as a vector and pos_alpha[ii[n]] and m[ii[n]] are passed as arrays of integers to segment(). The model compiles and runs successfully, vector, array[] int, array[] int are not incompatible.

However, when building partial_sum_lpmf(), segment() does not accept arguments of type vector, array[] int, array[] int and instead demands vector, int, int. Why?

I’m also curious why the model in this post Testing Reduce Sum used to work, which I assume it did, but now doesn’t because arguments are deemed incompatible.

Finally, I don’t see how to pass pos_alpha[ii[n]] and m[ii[n]] as integer values, if I have to index them as arrays of integers, except for maybe rewriting everything to make it fit.