How to rigourously define $G^{|A|}$? where G is a group and A being an infinite set. It is clear to me that $G^n:=G\times G\times ...\times G$. Every member of $G^n$ looks like $(g_1,g_2,...g_n)$.
But how to rigorously define $G^{|A|}$, i.e how to explicitly write elements of $G^{|A|}$?

$G^A$ is the set of functions $x:A\to G$, endowed with componentwise product and inverses. So to say, you gain access to the $a$-th component of the element $x$ by evaluating it, as a function, at $a$: id est $x_a:=x(a)$. More generally, you can define $\prod\limits_{i\in I}G_i$ as the set of functions $x:I\to\bigcup\limits_{i\in I}G_i$ such that $x(i)\in G_i$ for all $i\in I$. This works fine as a categorical product of groups.
When $G$ is a group, there is another (not the only other) useful notion, sometimes denoted as $G^{(A)}$, which is $$G^{(A)}:=\left\{x\in G^A\,:\, \operatorname{card}\{a\in A\,:\, x_a\ne e\}\text{ is finite}\right\}$$
