This question and its answers discussed the meaning and purpose of the vout array of a transaction in good detail. However, I have so far not been able to find any good information about how outputs in
vout are ordered.
For example, suppose a collaborative transaction involves two inputs and three outputs, where two of the outputs are change utxos that are sent to the respective parties who owned the inputs, would the 0-index vout always be the non-change output? Alternatively, would it be the highest value output (i.e. outputs are arranged in descending value order)? If neither is accurate, what is the vout ordering logic?
For a general transaction, are there any constraints in Bitcoin's consensus/conventions surrounding the ordering of vouts (and I suppose inputs, while we're on the subject)? I.e. is there a possibility that a transaction could be rejected by nodes for having an 'invalid' vout ordering?