Let:
- $G$ be a finite set, say $G=\{a_1,\dots,a_n\}$;
- $I_n:=\{1,\dots,n\}$;
- $f\colon I_n \times I_n \rightarrow I_n$ a map.
The composition law:
$$a_ia_j:=a_{f(i,j)}$$
turns $G$ into a group provided that:
i) closure: $f(i,j) \in I_n, \forall i,j \in I_n$ - O.K. by definition of $f$;
ii) associativity: $f(f(i,j),k)=f(i,f(j,k)), \forall i,j,k \in I_n$;
iii) unit: $\exists \bar i \in I_n$ such that $f(\bar i,j)=f(j,\bar i)=j, \forall j \in I_n$;
iv) inverse elements: $\forall j \in I_n, \exists k \in I_n$ such that $f(j,k)=f(k,j)=\bar i$.
Given $n$, can we find all the explicit expressions for such an $f$? How does play in this task the (arbitrary) labelling of set's elements?
My attempts go only little farther than $f(i,j):=i+j \mod n$, which gives rise to $\bar i=n$ and $G=\langle a_1 \rangle$.
Every finite group can be written in this way so there is a surjection from labelled finite groups to the functions you have described. As the function determines the group, finding all such functions for a given $n$ is at least as hard as finding as finding all groups of order $n$ (not generally easy for large $n$).
To describe the function $f$ for a given labelled finite group $G=\{a_1,\ldots,a_n\}$ you would define $f(i,j)=k$ such that $a_ia_j=a_k$.