A theorem by Parseval states that

**Theorem:** Any Hilbert $H$ space admits a maximal collection $\mathscr{E}\subset H$ of orthonormal vectors such that $H=\overline{\operatorname{span}(\mathscr{E})}$. Moreover, $x\in H$ can be expressed uniquely as $$x=\sum_{\boldsymbol{e}\in\mathscr{E}}\langle x,\boldsymbol{e}_\alpha\rangle \boldsymbol{e}_\alpha,\qquad \|x\|^2=\sum_{\boldsymbol{e}\in\mathscr{E}}|\langle x,\boldsymbol{e}\rangle|^2$$

The convergence of the sums above are in terms of *nets* over finite subsets of $\mathscr{E}$ (see note 1 below; also, this posting may be helpful)

**Q1.** For any nonempty set $R$, the space $\ell^2(R)$ is the collection of all functions $X:R\rightarrow\mathbb{C}$ such that
$$\sum_{r\in R}|X(r)|^2<\infty$$
where as above, convergence is in the sense of nets. It can be seen that on $\ell^2(R)$, the map $(\cdot,\cdot):\ell^2(R)\times\ell^2(R)\rightarrow\mathbb{C}$ given by
$$(X,Y)=\sum_{r\in R}X(r)\overline{Y(r)}$$
defines an inner product. The space of interest for the OP is $\ell^2(\mathscr{E})$, where $\mathscr{E}$ is a maximal orthonormal collection in the Hilbert space $H$.

**Q2.** For each $\boldsymbol{e}\in\mathscr{E}$, the map $E_\boldsymbol{e}:\mathscr{E}\rightarrow\mathbb{C}$ defined as $E_\boldsymbol{e}(\boldsymbol{e}')=\delta_{\boldsymbol{e},\boldsymbol{e}'}$ is clearly an element of $\ell^2(\mathscr{E})$; moreover, for any $\boldsymbol{e},\boldsymbol{d}\in\mathscr{E}$
$$(E_{\boldsymbol{e}},E_{\boldsymbol{d}})=\delta_{\boldsymbol{e},\boldsymbol{d}}$$
The dimension of $\ell^2(\mathscr{E})$ is defined as the cardinality of $\mathscr{E}$.

**Q3.** Appealing to Parseval's theorem and Bessel's inequality, one can se that the map $\Lambda:H\rightarrow\ell^2(\mathcal{E})$ defined as
$$(\Lambda x)(\boldsymbol{e})=\langle x,\boldsymbol{e}\rangle$$
is a linear isometric isomorphism between $H$ and $\ell^2(\mathcal{E})$, that is $\Lambda$ is onto and
$$(\Lambda x,\Lambda x)=\|x\|^2=\sum_{\boldsymbol{e}\in\mathscr{E}}|\langle x,\boldsymbol{e}\rangle|^2$$

**Notes:**

The potentially uncountable sums are understood in as limits of nets (instead of sequences). Order the collection $\mathcal{F}(\mathcal{E})$ of all finite subsets of $\mathcal{E}$ by inclusion. A function $\xi:\mathcal{F}(\mathcal{E})\rightarrow H$ (or net in $\mathcal{C}(\mathcal{E})$) converges to $h\in H$, iff for any $\varepsilon>0$ there is $C_\varepsilon\in\mathcal{F}(\mathcal{E})$ such that for all $D\in\mathcal{F}(\mathcal{E})$, $C_0\subset D$ implies
$$|\xi(D)-h|<\varepsilon$$

When $H$ is separable, one can take $\mathcal{E}=\mathbb{N}$ and all the net abstract nonsense reduces to the familiar real of sequences.

It is possible to define $\ell^2(\mathscr{E})$ as the $L^2$ space of a measure space. Define $\mathcal{P}(\mathscr{E}$ as the collection of all subsets of $\mathscr{E}$, and $\mu$ is the counting measure on $(\mathscr{E},\mathcal{P}(\mathscr{E}))$, that is, $\mu(A)=n\in\mathbb{Z}_+$ if $A$ is finite and has $n$ elements, and $\mu(A)=\infty$ otherwise. Then, it can be shown that $\ell^2(\mathscr{E})$ is the same as $L_2(\mathscr{E},\mathcal{P}(\mathscr{E}),\mu)$.

It can be show that if $A$ and $B$ are sets of the same cardinality, then $\ell^2(A)$ and $\ell^2(B)$ are isometric isomorphic.