I'm trying to generalize the concept of a Universal Enveloping Algebra as much as possible, I'm trying to do it categorically but my category theory is weak since I didn't take a course that covered it yet. Is this construction acceptable in any way?
Let $C$ be a concrete category with an embedding functor $F:\mathrm{Assoc}_1\rightarrow C$ where $\mathrm{Assoc}_1$ denotes the category of Associative Algebras with unity, for an object $X \in obj(C)$ we call a pair $(U(X),i)$ an universal enveloping algebra of $X$ of type $C$ if:
- $U(X) \in \operatorname{obj}(\mathrm{Assoc}_1)$ (it is an algebra)
- $i$ is a morphism in $C$ between $X \rightarrow F(U(X))$ (enveloping)
- For every morphism $\rho \in \operatorname{hom}(C)$ between $X$ and an element $F(V)$ with $V\in \operatorname{obj}(C)$ there is a unique morphism $\tilde{\rho}:U(X)\rightarrow V$ in $\operatorname{hom}(\mathrm{Assoc_1})$ such that $F(\tilde{\rho})\circ i = \rho$ (universal)
And use as an example the category of Vector Spaces $\mathrm{Vec}$ and the tensor algebra as a universal enveloping algebra of type $\mathrm{Vec}$. I didn't find many results that generalized a definition of it outside of uses in other specific areas and failure of existence in some cases.
Your generalisation is not only perfectly acceptable, it is basically one of the core concepts of category theory.
First, let me restate your definition a little bit. Let $F:D\to C$ be a functor ($C$ and $D$ can be any categories) and let $X$ be an object of $C$. We define the category $X\downarrow F$ to be the category whose objects are pairs $(Y,\alpha)$ where $Y$ is an object of $D$ and $\alpha:X\to F(Y)$ is an arrow in $C$, and the morphisms $(Y,\alpha)\to (Z,\beta)$ are morphisms $f:Y\to Z$ such that $F(f)\circ \alpha=\beta$. Then an "universal enveloping object of $X$ of type $C$" $(U(X),i)$ is an object of $X\downarrow F$ with the property that for all other objects $(V,\rho)$, there exists a unique morphism $\tilde{\rho}:(U(X),i)\to (V,\rho)$ in $X\downarrow F$; in other words, it is an initial object of $X\downarrow F$.
If such universal enveloping objects exist for all objects of $C$, then there is a canonical way to define morphisms $U(X)\to U(X')$ in $D$ for all $h:X\to X'$ in $C$ : you can simply use the universal property with the morphism $X\to X'\to F(U(X'))$. Then $U$ is in fact a functor, and the universal property you've described means that $U$ is a left adjoint functor of $F$.
There are numerous examples of this. You've already mentioned the tensor algebra as left adjoint to $\mathrm{Assoc}_1\to \mathrm{Vec}$. You can also take the forgetful functor $F:\mathrm{Ab}\to \mathrm{Grp}$, and then define $U(X)$ to be the abelianised group and $i:X\to F(U(X))$ the quotient map; this will have the same property. Another common example is "free-forgetful" adjunction : you can take the forgetful functor $\mathrm{Vec}\to\mathrm{Set}$, and then the free vector space on a set $X$, together with the canonical embedding of $X$ into it, will satisfy the same property again. For more examples, see this question.