I want to create a matrix of the form:
$X_\alpha = 1\otimes 1\otimes 1 ...\otimes X \otimes ... \otimes 1$
where $X$ is the Pauli $x$ matrix and is the $\alpha$th factor, and $1$ is the $2\times 2$ identity matrix. I have found answer on how to create a block diagonal matrices of this form for a specific placement of $X$ but I am trying to generalize it for an arbitrary $\alpha$.