I am looking for a "good" definition of a Hilbert space with a distinct orthonormal basis (in the Hilbert space sense) such that each basis element corresponds to an element of a given set $X$. Before I explain my attempt for a definition of this, let me talk about something analogous.
Analogy: There exists something analogous for vector spaces, namely the free vector space on the set $X$. This is a vector space $V(X)$ with a distinct basis such that every basis element corresponds to an element of $X$. More precisely, a free vector space on $X$ is a vector space $V(X)$, together with a map $i: X \rightarrow V(X)$ such that the following universal property is satisfied: For every vector space $W$ (over the same field) and every map $\phi: X \rightarrow W$, there is a unique linear map $\psi: V(X) \rightarrow W$ such that $\phi = \psi \circ i$. For such a free vector space over $X$, the set $i(X) = \{i(x) \mid x \in X\}$ is a basis of $V(X)$ such that each element of the basis corresponds to an element of $X$. I heard that one calls $V(X)$ the free vector space because $V(X)$ free object on $X$, but I don't fully understand this concept.
Let's restrict to complex vector spaces. For a given set $X$, one can construct a free vector space on $X$ as follows: One takes the set $V(X)$ of functions $f: X \rightarrow \mathbb{C}$ with finite support, endowed with pointwise addition and scalar multiplication. This is a vector space with the Kronecker delta functions $\delta_x$ (which evaluate to 1 on $x$ and to zero elsewhere) as a basis. Then $V(X)$, together with the map $i: X \rightarrow V(X), \ x \mapsto \delta_x$ is a free vector space on $X$.
My attempt: Inspired by the above construction of a free vector space on a set $X$, I want to define a free Hilbert space on $X$. Again, let's restrict to complex Hilbert spaces. For a given set $X$, let $\mathcal{H}(X)$ be the set of functions $f: X \rightarrow \mathbb{C}$ with countable support such that $\sum_{x \in \text{supp}(f)} \vert f(x) \vert^2 < \infty$, endowed with pointwise addition and scalar multiplication and the inner product $\langle f, g \rangle = \sum_{x \in \text{supp}(f) \cap \text{supp}(g)} f(x) \overline{g(x)}$. In other words, set $\mathcal{H}(X) := \ell^2(X)$. This is a Hilbert space where the Kronecker delta functions $\delta_x$ for $x \in X$ form an orthonormal basis. Let $i: X \rightarrow \mathcal{H}(X)$ be the map $x \mapsto \delta_x$.
My question: Is this a "good" definition of a free Hilbert space on a set $X$? Does it satisfy a universal property analogous to the one for free vector spaces? Is this a "Hilbert space with a distinct orthonormal basis such that each basis element corresponds to an element of $X$"?
What makes me skeptical is the fact that I found a document on the functor $\ell^2$ in which it is said that "The important $\ell^2$–construction is in many ways the closest thing there is to a free Hilbert space" (page 1) but also "Lemma 4.8 showed that $\ell^2(X)$ is not the free Hilbert space on X, at least not in the categorically accepted meaning." What is this "categorically accepted meaning" and how does it relate to the universal property of the free vector space i mentioned above?