I once came across a definition for the notion of basis that was independent of the type of the algebraic structure considered (although I cannot find where). Translated into category terminology, it went like this:
Let's consider a concrete category. We say that $B$ is a basis of object $X$ if $B=(B_i)_{i \in I}$ is a family of elements of $X$ such that for every object $Y$ and every family $(F_i)_{i \in I}$ of elements of $Y$, the function $f : B \rightarrow F$, defined by $$\forall i \in I,\quad f(B_i)= F_i$$ can always be extended to a unique homomorphism $\tilde f:X \rightarrow Y$.
To me it looks like such a definition describes most of the classical constructs we generally call bases. However a friend of mine considers this definition is not appropriate because it cannot take into account variants where we want to combine infinitely many elements (those cases are arguably not strictly algebraic). He offers two counter-examples: he considers that for the respective cases of Hilbert spaces and Banach spaces the appropriate equivalents of the notion of basis are respectively Hilbert bases and Schauder bases. Apparently in the latter case it is not even true that there necessarily exists a homomorphism mapping a given Schauder basis to another given Schauder basis. He suggests that the acceptable output families $F$ should be heavily restricted, but in the end he doubts it is even possible to come up with a working definition. His point is that those families should be too case-dependent to be easily expressed in terms of categorical terminology.
Has this question been tackled by category theory? Is my friend correct?