From this post I found out we can define a set of $n$ binary numbers mathematically like: $\mathbb Z_2^n$.
But what if I want to further restrict this set such that all the bits must be zero except for one? For example, elements of the set look like:
$$[1,0,0,\dotsc,0] \quad\text{or}\quad [0,1,0,0,\dotsc,0] \quad\text{or}\quad [0,0,\dotsc,0,1], \quad\text{etc.}$$
What would be mathematical notation for this restriction?
I don't know of any formal notation for this, but the set you are describing is precisely the powers of $2$ up to $2^{n-1}$; i.e. $\{2^a\mid a\in\mathbb Z,0\le a<n\}$. If you refer to such sets regularly, you may denote them by $A_n$ or whatever notation is convenient for you.