Random integer range with exceptions
As you already noticed, your code will loop forever if all array elements
are false, so you have to check first if at least one element is true.

If the array has \$ N \$ elements with \$ t \$ of them being true, then
the probability that a random number in the range \$ 0 ... N-1 \$ is
"valid" is \$ t/N \$. This means that the expected number of iterations
is \$ N/t \$. For example, if half of the possible directions are valid,
you'll need 2 iterations in average. If only 1% are valid, you'll need
100 iterations in average. 

Here is a possible alternative which needs only a single random number.
As I am not so familiar with C#, I'm
describing the algorithm only.


Count the number \$ t \$ of true elements in the array.
Terminate if \$ t = 0 \$.
Compute a random number \$ i \$ in the range \$ 1 ... t \$.
Traverse the array once to find the \$i^\text{th} \$ entry which is true.
The index of that element is your result.