The legality of marriage really comes down to a set of default contracts between two parties, subject to modification by prenuptial and postnuptial agreements.
It is possible to duplicate virtually all of these between two (or more!) unmarried persons with the correct set of legal agreements. The exact level of duplication will vary depending on what the local default agreements are and what rights and obligations can be secured under local contract and power of attorney laws.
Hey Tuco, want to set up a "2nd Wives Legal Service" with me?