They're all UTXOs from a legacy address so I figured that the witness array still needs to be the total length of the inputs.
I have not tested with a bech32 address yet, because I was busy verifying that legacy transaction creation works (it does).
I am relatively certain that in this case you are not allowed to create a Segwit transaction. It must be a legancy TX!