This actually took we quite a while because the serialization, Output definitions, and where it is added to the output stream is like 4 different files.
SERIALIZE_METHODS is a macro that writes both nValue and scriptPubKey(including the OP_RETURN and all its data push to the transaction output stream.