Electroweak field-strength tensors The Lagrangian density for the interaction term of the bosons $W_1,W_2,W_3,B$ in the  electroweak theory is
$$
\mathcal{L}_g=-\frac{1}{4}\operatorname{Tr}(W^{\mu\nu}_aW_{\mu\nu}^a)-\frac{1}{4}B^{\mu\nu}B_{\mu\nu}
$$
The wikipedia article about Electroweak interaction claims that $W$ and $B$ are the field strength tensors and then links to the field strength tensor of electromagnetism. So, do these tensors are of the same mathematical structure as the one of electromagnetism, except there are 4 of them?

In electromagnetism,
$$
F^{\mu\nu}=\pmatrix{0 & -E_x/c & -E_y/c & E_z/c\\E_x/c&0&-B_z&B_y\\E_y/c & B_z& 0&-B_x\\E_z/c&-B_y&B_x&0}
$$
The theory has 6 degrees of freedom.

Are the four tensors of $W$, $B$ of the same structure, expect the variables are different and independent in each tensor? For instance:
$$
W^{\mu\nu}_1=\pmatrix{0 & -A_x/c & -A_y/c & A_z/c\\A_x/c&0&-C_z&C_y\\A_y/c & C_z& 0&-C_x\\A_z/c&-C_y&C_x&0}
$$
$$
W^{\mu\nu}_2=\pmatrix{0 & -D_x/c & -D_y/c & D_z/c\\D_x/c&0&-G_z&G_y\\D_y/c & G_z& 0&-G_x\\D_z/c&-G_y&G_x&0}
$$
$$
W^{\mu\nu}_3=\pmatrix{0 & -H_x/c & -H_y/c & H_z/c\\H_x/c&0&-K_z&K_y\\H_y/c & K_z& 0&-K_x\\H_z/c&-K_y&K_x&0}
$$
$$
B^{\mu\nu}=\pmatrix{0 & -V_x/c & -V_y/c & V_z/c\\V_x/c&0&-U_z&U_y\\V_y/c & U_z& 0&-U_x\\V_z/c&-U_y&U_x&0}
$$
And has 24 degrees of freedom?

That seems like a ton of degrees of freedom, so where did I mess up?
Finally, do the connection between $-\frac{1}{4}\operatorname{Tr}(W^{\mu\nu}_aW_{\mu\nu}^a)$ and $SU(2)$ and between $-\frac{1}{4}B^{\mu\nu}B_{\mu\nu}$ and $U(1)$ somehow causes the degrees of freedom to drop to $3$ and $1$ respectively --- how?
 A: First, some clarifications
The expression and the terms you wrote are only valid before the electroweak transition into electromagnetic and weak interaction, i.e. before the Higgs mechanism kicks in enabling Spontaneous Symmetry Breaking (SSB).
The pre-SSB massless field strengths are then:
$$B^{\mu\nu} = \partial^{\mu}B^{\nu}-\partial^{\nu}B^{\mu},$$
$$ \tilde{W}^{\mu\nu} = \frac{\mathrm{i}}{g} \left [ D^{\mu}, D^{\nu} \right ]  = \partial^{\mu} \tilde{W}^{\nu} - \partial^{\nu} \tilde{W}^{\mu} - \mathrm{i}g \left [ W^{\mu}, W^{\nu} \right ] $$
where $g$ is the interaction strength (absent in EM because in this case the symmetry group $SU(2)$ is non-Abelian), $W^\mu$ (one index) is the gauge field, $W^{\mu\nu}$ (two indeces) the field strength, and the latter two are related by:
$$ \tilde{W}^{\mu\nu} = \frac{\sigma^i}{2}W^{\mu\nu}_i $$ and hence
$$ W^{\mu\nu}_i = \partial^{\mu}W^{\nu}_i - \partial^{\nu} W^{\mu}_i + g \epsilon^{ijk}W^{\mu}_j W^{\nu}_k. $$
I wrote these all out so that it's clear that the kinetic part of the Lagrangian is:
$$ \mathcal{L}_{\mathrm{kin}} = -\frac{1}{4}B_{\mu\nu}B^{\mu\nu} - \frac{1}{2} \mathrm{Tr} \left [ \tilde{W}_{\mu\nu}\tilde{W}^{\mu\nu} \right ] = -\frac{1}{4}B_{\mu\nu}B^{\mu\nu} - \frac{1}{4}W^i_{\mu\nu}W^{\mu\nu}_i,$$ i.e. the trace is over the internal numbering of the gauge fields $a$.
Question about tensors

Are the four tensors of $W$, $B$ of the same structure, expect the variables are different and independent in each tensor? For instance [...]

Yes, essentially each of them is like an independent electromagnetic field strength (Faraday tensor), albeit without an analogously trivial physical meaning of electric $E$ and magnetic $B$ fields components. A meaning which would come after SSB anyway (i.e. after $B^\mu$ mixes with $W_3^\mu$ to become $A^\mu$ which defines the Faraday tensor $F^{\mu\nu}$).
Degrees of freedom
Each field strength has $4\times 4 = 16$ entries, but they are antisymmetric so there are $6$ independent degrees of freedom for each. So, as you said, $6\times 4 =24$.
But consider the underlying gauge fields, four-vectors with $4$ degrees of freedom each. They are massless (at this stage, pre-SSB) and subject to an arbitrary gauge fixing, each of which takes $1$ degree of freedom away so as to leave $2$ each, so $2\times 4 = 8$ total degrees of freedom.
To this you should add the $4$ d.o.f. of the complex Higgs field doublet pre-SSB, $(H^+, H_0)$.
Do these make sense?
Yes.
After SSB, you know you'll get $3$ massive vector bosons $W^{\pm}$ and $Z^{0}$ ($3$ degrees of freedom each), $1$ massless photon ($2$ d.o.f.), and one real scalar Higgs boson ($1$ d.o.f.)
So the total is $12$, before and after SSB.
Groups?
The group symmetry assumed in the gauge covariant derivatives $D^\mu$ is $SU(2) \times U(1)$. This has $3+1$ generators.
During SSB, $3$ of these are broken and one remains unbroken, which corresponds to the $U(1)$ symmetry associated with electromagnetsm (the $U(1)$ pre-SSB is denoted $U(1)_Y$ to distinguish it from the latter). The $3$ broken generators are "eaten up" by the $3$ massless gaguge fields and end up giving mass to them.
