In programming, we define an "array" (basically an ordered n-tuple) in the following way:
$$a=[3,5].$$
Later on, if we want to refer to the first element of the predetermined array/pair/n-tuple, we write $a[0]$ (because in programming you start counting from $0$, not $1$), which will be equal to $3$.
Is there a similar notation for doing this in mathematics? E.g something like (3,5).firstElement, which would equal $3$? Or is such a reference only possible by using the set-theoretic definition of an ordered pair?