How can I map arbitrary group elements to unique integers without using Hash functions?
The order of every element $g$ of a group $G$ divides the order of the group ($p$).

Since $p$ is prime, every $g\in G$ has order $1$ or $p$. Only the identity element $e$ satisfies the first case, so every $g\in G\setminus\{e\}$ is a generator of $G$, i.e., $$G = \{g^0,g^1,g^2,\cdots,g^{p-1}\}.$$

This allows defining a bijection $$\begin{array}{cccc}\varphi:&amp;\mathbb Z_p&amp;\rightarrow&amp; G\\&amp;n&amp;\mapsto&amp;g^n\end{array}.$$

If you can find $\varphi^{-1}$, you're done.