How do we mathematically define a vielbein field? My question is about the mathematical structure of vielbeins. I'll outline what I think I understand so far, but please point out any misunderstandings.
Given a manifold $M$, consider a chart $(U, x)$. The chart defines a coordinate basis $\{e_{\mu}\}$. I will use Greek indices to indicate coordinate bases. On the other hand, we may choose a frame field (vielbein) - a local smooth section of the frame bundle of $M$. In physics it's common to choose this vielbein basis to be orthonormal, although I don't think that is necessary for this question. I will use Latin indices to denote vielbein bases $\{\hat{e}_a\}$. I add the hat to indicate that these form an orthogonal basis, although if they weren't then this notation is just to distinguish them from what will follow. I will use $\{\epsilon^{\mu}\}$ to denote the dual basis of the dual space, and the same for vielbeins.
Now most sources write $\hat{e}_a = {e_a}^{\mu}e_{\mu}$. I will instead write $\hat{e}_a = {A_a}^{\mu}e_{\mu}$ to hopefully make things clearer. The quantity $A$ is known as the vielbein field. At a point, it defines an automorphism of the tangent space. We can associate an automorphism to a tensor (field) in the following way.
\begin{align}
    \begin{aligned}
    A: TU &\longrightarrow TU\\
    X &\longmapsto T(\cdot, X),
    \end{aligned}
\end{align}
where
\begin{align}
    \begin{aligned}
    T:TU^{*}\otimes TU &\longrightarrow \mathbb{R}\\
    (\omega, X) &\longmapsto T(\omega, X) := (A(X))(\omega).
    \end{aligned}
\end{align}
A question here: what is the relation between $A$ and $T$? Can you say $A = T$? If not, then what should one say?
Continuing, we now write $A$ in a coordinate basis:
\begin{align}
    A = {A^{\mu}}_{\nu}\;e_{\mu}\otimes\epsilon^{\nu},
\end{align}
where \begin{align}
    {A^{\mu}}_{\nu} := (A(e_{\nu}))(\epsilon^{\mu}) = T(\epsilon^{\mu}, e_{\nu}).
\end{align}
Next, I want to try and return to $\hat{e}_a = {A_a}^{\mu}e_{\mu}$. I'm not sure what to do here, but I started with
\begin{align}
A(\hat{e}_a) = {A^{\mu}}_{\nu}\;e_{\mu}\otimes\epsilon^{\nu}(\hat{e}_a) = {B^{\mu}}_{a}e_{\mu},
\end{align}
where ${B^{\mu}}_{a} = {A^{\mu}}_{\nu}\epsilon^{\nu}(\hat{e}_a)$. If we relabel $B\rightarrow A$, now we have the same form I wanted to return to (up to the order of indices, which I hope is a mistake due to convention, but may be more important than I can see). But the problem this leaves me with is that this would then require defining
\begin{align}
\hat{e}_a := A(\hat{e}_a),
\end{align}
which can't be right.
I hope someone can explain the structure a bit more rigorously and see my mistakes/misconceptions, but please ask if it is not clear where I am confused.
 A: I am not sure if this is what you are looking for, but nevertheless, let me say the following:
In full generality, a "vielbein" on a d-dimensional spacetime is defined to be a vector bundle isomorphism
$$e:T\mathcal{M}\to\mathcal{T},$$
where $T\mathcal{M}=\coprod_{p\in\mathcal{M}}T_{p}\mathcal{M}$ denotes the tangent bundle of the spacetime manifold $(\mathcal{M},g)$ and where $\mathcal{T}$ is some other vector bundle, called "internal space". Note that equivalently one can view $e$ as a $\mathcal{T}$-valued $1$-form, i.e. $e\in\Omega^{1}(\mathcal{M},\mathcal{T})$. Now, the bundle $\mathcal{T}$ is usually chosen to be the associated vector bundle $\mathcal{T}:=F_{\mathcal{Ort}}(\mathcal{M})\times_{\rho}\mathbb{M}^{d}$, where $F_{\mathcal{Ort}}(\mathcal{M})$ is the "orthonormal frame bundle", which is a principal $\mathrm{SO}(1,d-1)$-bundle, whose fibres are just the orthonormal bases of the tangent spaces $T_{p}\mathcal{M}$, where $\mathbb{M}^{d}=\left(\mathbb{R}^{d},\eta\right)$ is the Minkowski space and where $\rho:\mathrm{SO}(1,d-1)\to\mathrm{Aut}(\mathbb{M}^{d})$ is the fundamental representation.
Now, if the manifold $\mathcal{M}$ is parallelizable, then you can identify $e\in\Omega^{1}(\mathcal{M},\mathcal{T})$ with an element $e\in\Omega^{1}(\mathcal{M},\mathbb{M}^{d})$ and hence, you can write that $e=e^{a}v_{a}$, where $v_{a}$ is an orthonormal basis of $\mathbb{M}^{d}$ and where $e^{a}$ are real-valued coordinate forms. Furthermore, you can write the real-valued forms $e^{a}$ as $e^{a}=e^{a}_{\mu}\mathrm{d}x^{\mu}$, as usual. Using orthonormality, we then have that $\eta_{ab}e^{a}_{\mu}e^{b}_{\nu}=g_{\mu\nu}$, which in physics is often used as definition of the vielbein fields.
Of course, strictly speaking, the map $e$ discussed so far are the "co-vielbein-fields" and its inverse $e^{\mu}_{a}$ are the "vielbein fields".
This answer is mathematically quite technical, but since you asked for a mathematical definition, I thought I just write it here. If something is not clear, then do not hesitate to write a comment below. :-)

Answers to the additional questions of OP's Edit:

*

*This is just a general fact for vector valued differential forms: Lets take an arbitrary (finite-dimensional) real vector space $V$. Then take a basis $\{v_{a}\}_{a=1}^{\mathrm{dim}(V)}$ of $V$. Then it is easy to see that you can write every form $\omega\in\Omega^{k}(\mathcal{M},V)$ as
$$\omega=\sum_{a=1}^{\mathrm{dim}(V)}\omega^{a}v_{a},$$
where $\omega^{a}\in\Omega^{k}(\mathcal{M})$ are real-valued forms. This is what I meant by the term "coordinate forms". This is used quite often when taking about vector-valued differential forms, because using this you can extend many operations (like the wedge-product, exterior derivative) to vector valued forms. In our case above, the vector space is $V=\mathbb{M}^{d}$.

*Lets take an arbitrary $1$-form $\alpha\in\Omega^{1}(\mathcal{M})$. Then, in order to write this in coordinates, take a local chart $(U,\varphi)$ of our manifold $\mathcal{M}$ and write $\varphi=(x^{1},\dots,x^{d})$. Then, you can write
$$\alpha=\sum_{i=1}^{d}\alpha_{\mu}\mathrm{d}x^{\mu}$$ where $\alpha_{\mu}\in C^{\infty}(U)$ are smooth functions. In our case, we have the vector-valued form $e\in\Omega^{1}(\mathcal{M},\mathbb{M}^{d})$. Then, as explained above, you can write $e=e^{a}v_{a}$ for some basis $\{v_{a}\}$ of $\mathbb{M}^{d}$, where $e^{a}\in\Omega^{1}(\mathcal{M})$ are just ordinary real-valued differential forms. Since these are just ordinary real-valued forms, you can write $e^{a} =e_{\mu}^{a}\mathrm{d}x^{\mu}$, where $e_{\mu}^{a}\in C^{\infty}(U)$. This is just the same as before, but now we have the additional label $a$, since we have several $1$-forms, but this should not be to confusing.


Answer to the question in the comments:
Yes, the vector bundle $F_{\mathrm{Ort}}(\mathcal{M})\times_{\rho}\mathbb{M}^{d}$ is defined using an equivalence relation. This is a particular example of so-called "associated vector bundles". Consider an arbitrary principal $G$-bundle $P$ over $\mathcal{M}$, which is a fibre bundle $G\to P\to\mathcal{M}$ with some extra properties. Now, take a finite-dimensional real or complex representation $(\rho,V)$ of $G$. Then one defines a vector bundle denoted by $P\times_{\rho}V=:E$ to be the vector bundle with fibres given by $E_{x}:=(P_{x}\times V)/G$, where the equivalence relation is defined by
$$(p,v)\sim (p\cdot g,\rho(g)^{-1}v).$$
The symbol "$\cdot$" here denotes the group action of the principal bundle. The vector space structure of the fibres $E_{x}$ is the obvious one, i.e.
$$[p,v]+\lambda [p,w]:=[p,v+\lambda w].$$
Let me stress that the notion of associated vector bundles is also very important in physics. You might know that "fields" are in mathematical physics usual defined to be sections of bundles. Now, if you have a gauge theory described by some principal bundle, then matter fields coupled to gauge fields (like in Klein Gordon theory with gauge fields, Higgs field, standard model,...) are sections of the associated vector bundles of the principal bundle with the representation in which the transform. (At least for the bosonic case. For fermions, you need the notion of twisted spinor bundles, which is more complicated.)

Literature:
I am also not an expert on vielbein fields, but I needed the mathematical definition myself some time ago. Hence, I know that it is quite hard to find a mathematical discussion in the literature, since most of the ressources just define them locally. However, after some time I found some ressources, which I can share here with you. These references are not precisely about vielbein fields in general, but include some nice discussion of their mathematical definition and structure:

*

*There is a nice paper by M. Tecchiolli, which also contains some discussion of many mathematical preliminaries: On the Mathematics of Coframe Formalism and Einstein-Cartan Theory.

*In the recent book "Formulations of General Relativity: Gravity, Spinors and Differential Forms" by K. Krasnov from 2020, Cambridge University Press, there is also a mathematical discussion of tetrads.

*The thesis Topological Gauge Theory, Cartan Geometry, and Gravity by D. K. Wise also contains some discussion of the mathematics of frame fields, explaining also the relation to gravity and $BF$-theory.

