I have expressions (type of a function) like e.g.
$$f:(A\to B)\to C \to (D\to E)\to F.$$
(Where I understand $A\to B\to C$ as $A\to (B\to C)$, in case that is relevant.)
There might be information associated with each symbol/type "$A,B,...$" as well as with each of the arrows "$\to$". Given the expression above, I would like to refer to these symbols, but not by stating the symbol but in terms of $f$. Like for example I might want to say "$E$ is $\mathbb{R}$." and would naively express this like "$f_{9}$ is $\mathbb{R}$." where I just made up the convention that $f_i$ denotes the $i^{\text{th}}$ symbol in the type of $f$. I could equally well refer to the two objects "arrow-symbol" and "non-arrow-symbol" seperately, so that in this case $E$ would be the $5^{\text{th}}$ non-arrow symbol. Or I could take into account that e.g. "$(A\to B)\to C$" is totally differently "stacked" than "$A\to (B\to C)$" and hence use an enumeration which climbs down that syntactic tree.
Is there a standard or canonical way to refer to the items of an expression (logic, type, any syntactic expression really)? More generally one might ask if there is some canonical enumaration principle for trees.
I'm concerend with types of functions here, but the question can be understood as a more general reference request for standard notation.
I also don't know about normal forms of types, which might be relevant to make the enumeration more robust in case there are more ways to do it (robust in that the enumeration would not by dependend of the particular way the type is stated).