The whole purpose of law is to be a uniform system of justice. At best it could offer guidelines for how to evaluate people: perhaps level of education attained, demonstrated ability to take responsibility for themselves, etc. But the evaluation under those guidelines would still have to be made by humans.
There is precedent for such a system, e.g. minors can petition to be emancipated which allows them to be treated in many regards like an adult.
> perhaps level of education attained, demonstrated ability to take responsibility for themselves, etc.
Yes, that is what I meant. Choosing some arbitrary magic number like 18 and declaring that anyone under that age is too dumb or too irresponsible to decide is about as stupid as declaring that anyone over 65 is incapable of decision making because they might have Alzheimer's.