Can we have vectors with vectors as components? I was working on my course on Electrodynamics earlier today, when I was tasked with computing the eletric field of a non-trivial charge distribution, and it struck me that I had a field with components in both the $x$ and $y$ directions. So here I was, I had an infinitesimal electric field
$$d\textbf{E}=(d\textrm{E}_x,d\textrm{E}_y)$$
To get the components in their fullest form, i.e. $E_x$ and $E_y$ I had to compute two integrals, and that's when it hit me. What if I could write this as a single integral with some absolutely cursed notation, so I wrote
$$\textbf{E}=\int_{L} \hat{\textbf{r}}\cdot d\textbf{E}=\int_L\left(d\textrm{E}_x\hat{\textbf{x}}+d\textrm{E}_y\hat{\textbf{y}}\right)$$
Where I have used that this
$$\hat{\textbf{r}}=(\hat{\textbf{x}},\hat{\textbf{y}})$$
Now, mind you, I am in engineering classes and am by no means a mathematics student, so I am wondering, is there anything that hinders me from writing this abomination (if anything, just as a joke the t.a. could have a giggle at)? I mean yes, it strikes me as odd that the dot product would return a vector, and that I am trying to take the integral of a vector, but the entire vector of vectors thing had me going, so I kind of had to ask the question to and see if it lead me somewhere.
 A: First look at what $\hat{r}=(\hat{x},\hat{y})$ means.$$\hat{r}=(\hat{x},\hat{y})=\hat{x}\otimes \hat{x}+\hat{y}\otimes \hat{y}$$
Where $\otimes$ denotes vector scalar multiplication. Notice that by definition the vector scalar multiplication is a functions that takes in a scalar and a vector and outputs a vector, which is not the case here. So this definition as is doesn't make any sense because you have some undefined vector vector multiplication. You may define itsuch that this gives you a certain vector (and there are vector vector multiplications defined), and only then would it make sense to talk about $\hat{r}$; otherwise, you are in of course no position to talk about dot products.
Just for example we could try defining it like this:
$$u\otimes v=A\hat{x}+B\hat{y}+C\hat{z}$$
Where $A,B,C$ are scalars. All that would be left would be to define what those scalars are. One such candidate is the cross product which would have $A,B,C$ in terms of the components of $u$ and $v$. If such a definition is given, then your $\hat{r}$ is the zero vector, so this probably wouldn't be very helfpul. Let's try and define it in a way that agrees with your integral. That is,
$$\hat{x}\otimes \hat{x}=\hat{x} \hspace{1mm} \text{and} \hspace{1mm}\hat{y}\otimes \hat{y}=\hat{y}$$
So, if we adopt usual multiplication properties like associativity and distributivity
$$u \otimes v=\left(\sum_i u_i \hat{x_i}\right)\otimes \left(\sum_i v_i \hat{x_i}\right)=\\
\sum_i \sum_j u_i\,v_j \hat{x_i} \otimes \hat{x_j}
$$
Notice that when $i=j$ you have $\sum_i v_i\,u_i \hat{x_i} $. Now for $i \neq j$ you have to define something. We could just set it to zero. Then, your $\hat{r}$ becomes
$$\hat{r}=\hat{x}+\hat{y}$$ and your integral becomes
$\int dE_x+dE_y$.
Another thing to have in mind is that dot products are bilinear applications from pairs of vectors to scalars. As such, the claim that $(\hat{x},\hat{y}) \cdot (dE_x,d_Ey)=\hat{x}dE_x+\hat{y}dE_y$ doesn't make sense; granted that, if you want to, you can define another operation with this property, but it will no longer be a dot product. 
Anyway the moral of the story is, you can do whatever you want as long as you define it well.Nonetheless, I would advise you to be careful when inventing definitions so that notations make sense. There have been times when it has yielded powerful math, but most of the times it just induces you in error.
