Generate a set of random vectors whose inner products are uniform

Let $\boldsymbol{e}_1,\dots,\boldsymbol{e}_d$ be the standard coordinate basis for $\mathbb{R}^d$ such that $\langle \boldsymbol{e}_i,\boldsymbol{e}_j\rangle =\delta_{ij}$. Then take $\boldsymbol{x}_j = a \boldsymbol{e}_1 + \sqrt{1-a^2} \boldsymbol{e}_{j+1}$ for $j \in \{1,2,\dots,n\}$ (and $d=n+1$). For vectors with only $0,1$ entries you would need to drop the norm-$1$ condition, say replacing it by norm-$\sqrt{M}$ for some $M\in\mathbb{N}$. Then if you wanted to get $\langle \boldsymbol{x}_i,\boldsymbol{x}_j\rangle = (M-K)+K \delta_{ij}$ for some $K \in \{0,1,\dots,M\}$, you could take $d=M+(n-1)K$. Then, for $i \in \{1,\dots,M-K\}$, take $\langle \boldsymbol{x}_j,\boldsymbol{e}_i\rangle=1$. For $i \in \{M-K+1,\dots,M-K+nK\}$ take $\langle \boldsymbol{x}_j,\boldsymbol{e}_i\rangle$ such that it equals 1 if and only if $i-M+K$ is in $\{(j-1)K+1,\dots,jK\}$. I would guess that there are other ways, too.