I finally solved it (in a way at least). In addition to creating an array for my output addresses, I also created an array for the input address and one for the change addresses. Then, I iterated over each of them for each transaction, and it worked!
That's one way to work around it, you've utilized from_addr= and change_addr= params.So, it's something like?:
Input1 ═══> Output1You're lucky that Electrum by default spends all of the UTXO linked to a single address.
╚══> Change1/Input2 ═══> Output2
╚══> Change2/Input3 ∙∙∙
Else, it could break the chain if an address in the change/input array has more than one UTXO then a smaller UTXO was selected as an input.
Sort of. I did use those parameters, but I also specified different change and input addresses, so they are not linked. Since it is fairly trivial to spread one's funds into many addresses through a single pay-to-many transaction, it's possible to create an array of unique input addresses, an array of unique output addresses, and an array of unique change addresses.