Tensor Index Notation Tensors, as I understand, are a sort of functions that contain information on how to transform a set of vectors and dual vectors, represented by a matrix. However, what I don't understand is the differing notation used to represent them. For example, I've seen both 
$g_{\mu \nu} = \begin{pmatrix}-1 && 0 &&0&&0\\0&&1&&0&&0\\0&&0&&1&&0\\0&&0&&0&&1 \end{pmatrix} \tag*{}$
i.e., the metric tensor, denoted with the indices below, and other tensors denoted, say, $T^{\mu \nu}$ or $T^{\mu}_{\nu}$. These would transform different types, as in, two vectors ($g_{\mu \nu}$), two dual vectors, or a vector and a dual vector. I'm unable to understand how to, given a tensor, rearrange the components to form other tensors, say take $g_{\mu \nu}$ and find $g^{\mu}_{\nu}$, $g^{\mu \nu}$, or even $g_{\nu}^{\mu}$ for example. How would one do this?
 A: Tensors
An $(p,q)$-rank tensor is a multilinear map from $q$ copies of a vector space and $p$ of its dual to the underlying field, i.e. $(V^*)^p \times V^q \to F $ and linear in each component. In physics normally $V=\mathbb{R}^d$ and $F=\mathbb{R}$. (In particular, elements of $V^*$ may be thought of as $(0,1)$-tensors.)
This definition automatically incorporates all the transformation-under-change-of-basis business that physicists seem to think is basic in their definition. In particular, components of elements of $V^*$ transform oppositely to those in $V$ (since scalars like $\alpha(X)$, $\alpha \in V^*$, $X \in V$ must remain the same under a change-of-basis), so one introduces upper and lower indices to take this into account. Components also transform oppositely to the basis vectors, since the object $X = X^j e_j$ is the same whichever basis is used.
If $V$ has a basis $e_j$, $V^*$ has a dual basis $\epsilon^i$ defined by $\epsilon^i (e_j) = \delta^i_j $. The components of a vector $X$ can be written as $X^i = \epsilon^i(X)$, which explains why the transform in the same way under a change of basis.
Because $V^{**} \cong V$ (and $V^{***} \cong V^*$), any tensor can be expanded in a basis as $$T = T^{i\dotsm j}{}_{k \dotsm \ell} e_i \otimes \dotsb \otimes e_j \otimes \epsilon^k \otimes \dotsb \otimes \epsilon^\ell . $$
The components of $T$ can also be written as
$$ T^{i\dotsm j}{}_{k \dotsm \ell} = T(\epsilon^i,\dotsc,\epsilon^j,e_k,\dotsc,e_\ell). $$
(Therefore, $V$ is isomorphic to the space of $(1,0)$-tensors.) This is really useful, because this means that if you know how do something for vectors and dual vectors, you can do it for a tensor of any rank.

The metric
Now, the metric tensor is a special $(0,2)$-tensor $g$ we choose to provide a map $V^2 \to F$, which allows us to measure "lengths" of vectors (it has to be nondegenerate and symmetric to do this in a sensible way). However, it gives us extra structure for free: if we apply $g(-,-)$ to one vector $X$, we have $g(V,-)$, which is a linear map $V \to F$, i.e. a dual vector. Hence the map $X \mapsto g(X,-)$ is a way to identify $V$ with $V^*$. (There is no canonical way to do this, but $g$ gives us a consistent way.)
So in components, $$ g(X,-) = g_{ij}\epsilon^i(X^k e_k)\epsilon^j = g_{ij}X^k \delta^i_k \epsilon^j = (g_{kj} X^k) \epsilon^j, $$
so the components of $g(X,-)$ are often written $X_k = g_{kj} X^k$. This is often called "lowering the index".
Exactly the same procedure works for any dual vector, but we have to introduce the inverse of this operation ("raising the index"), which is done by the operator $g^{ij}$, defined by $g^{ij} g_{jk} = \delta^i_k$. This operator can be thought of as a map $V^* \to V$, or a map $(V^*)^2 \to F$; it is called the inverse metric, because $g^{ij} g_{jk} = \delta^i_k$ implies that its matrix is the inverse matrix of $g_{ij}$. And thus since we know how to do it for vectors and dual vectors, we can do it for any tensor: for example, given $T^{jk\ell}$, we can define a tensor with a lowered index by $T_i{}^{k\ell} = g_{ij} T^{jk\ell} $, or we could lower all of them by $T_{ijk} = g_{i\ell}g_{jm}g_{kn}T^{\ell m n}$.

A word about matrices
A matrix is a two-dimensional array of numbers. We normally think of matrices as providing a mapping $V \to V$, which means they can be thought of as objects in $V \times V^*$, i.e. $(1,1)$-tensors. In tensor analysis we have two different things that look like matrices, but behave differently.


*

*Change of basis Given two bases, the map describing how the components change is a linear map $V to V$, and so may be written as a matrix. However, it does not behave like a tensor, because it is heterobasic: one of its indices refers to the old basis, the other to the new. (Also, it acts on bases and components, not the whole vector.)

*(0,2) tensors such as the metric. These may also be written as matrices (and certain matrix properties such as the the determinant and the inverse of the metric in particular are useful), but transform differently under a change of basis: in matrix terms, whereas an ordinary matrix transforms as $M \mapsto S^{-1}MS$ via a change of basis, if $G$ is the matrix of the metric, it transforms as $ G \mapsto S^TGS$.
Therefore matrices are a useful form of bookkeeping, but require some caution to deploy correctly.
A: The concept you're looking for is 'raising and lowering indices.'
https://en.wikipedia.org/wiki/Raising_and_lowering_indices
There is a little bit of confusion I think, although I could be wrong, because I have never seen a tensor written $g_\mu^\nu$ to be anything relating to the metric. Typically both coefficients down is just the metric, and both coefficients up is the inverse matrix.
The article contains an example or two. Be aware that the Einstein summation convention is used throughout.
