Arbitrary is defined as: "based on random choice or personal whim, rather than any reason or system." Choosing an age of consent at which point the state considers the vast majority of people to be mature enough to make that decision isn't arbitrary at all, it's selected for an explicit reason, and a sound one at that. Additionally, just because experts may disagree on whether an individual is of sound mind or not in no way invalidates the idea that the state would attempt to prohibit those who could not understand its terms from participating in it.But it is arbitrary. The age of consent to marriage is an arbitrarily-defined phenomenon. Does it make sense that a five year old is incapable of understanding the ramifications? Yes. Does it make sense that someone one day, one week, or one month away from the age of consent is somehow incapable of understanding the ramifications of marriage but if they wait 24 hours or seven days they magically become capable? No, it does not. Even the soundness of mind test is arbitrary; two psychologists can easily disagree on the capacity of an individual.
That's the whole point: when a threshold is set it is done so at a point where most cases will seem appropriate but borderline cases will always be open for interpretation. That's pretty much the definition of an arbitrary threshold. (Where arbitrary is defined as: contingent solely upon one's discretion)
Neither one of those examples is arbitrary by any commonly understood definition of the word.