Answer to EDIT in question:
It is possible to prepeare a state
$$|\psi\rangle = \frac{1}{\sqrt{m}}\sum_{i=0}^{m-1}|i\rangle,$$
where $m = 2^n$ and $n$ is a number of qubits, by application of operator $\otimes H ^{n} = H_{q_0} \otimes H_{q_1} \otimes \dots \otimes H_{q_{n-1}}$, i.e. Hadamard gate is applied on each qubit involved. As a results, you will get $n=\log{m}$ qubits in superposition described by uniform probability distribution. It is a generalization of construction provided in answer by met927
EDIT: based on comment by Adam Levine: "what if for example $m=5$?"
It that case you have to prepare entangled state and the approach is a little bit more intricated. For $m=5$ you have to prepare state (I switched to more common convention with states expressed in binary numbers instead of decimal):
$$
|\psi\rangle = \frac{1}{\sqrt{5}}(|000\rangle + |001\rangle + |010\rangle+|011\rangle+|100\rangle),
$$
i.e. three qubits state where $|101\rangle$, $|110\rangle$ and $|111\rangle$ have zero probability.
To prepare an arbitrary state, you can employ approach presented in this article:
Transformation of quantum states using uniformly controlled rotations.
Based on the article, a circuit preparing state $|\psi\rangle$ is this:

Here you can see results provided by IBM Q simulator:

Apparently, the circuit prepared desired state with uniformly distributed values from $|000\rangle$ to $|100\rangle$.
EDIT 2: here is a code in QASM of the circuit above:
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c[3];
ry(0.927) q[0];
ry(pi/4) q[1];
cx q[0],q[1];
ry(pi/4) q[1];
cx q[0],q[1];
ry(pi/2) q[2];
cx q[1],q[2];
ry(-pi/4) q[2];
cx q[0],q[2];
ry(pi/4) q[2];
cx q[1],q[2];
cx q[0],q[2];
measure q[0] -> c[2];
measure q[1] -> c[1];
measure q[2] -> c[0];