NateTG has it pretty well figured out, but I never did see until now. By the way, they are called cyclic numbers and can be googled.
We have 1/7 = \overline{.142857}. (Where the overline means the period is repeated and repeated)
The first decimal,1, represents how many times 7 goes into 10 whole , 14 represents how many times 7 goes whole into 100, 142 for 1000, etc.
Thus if we look at 100/7 = 14\overline{.285714}
But 100/7 = 14 +2/7, so we end up with 2/7= \overline{.285714}
Thus as NateTG tells us to get the full array we need to have a cycle of N-1 digits, where 10^(N-1)==1 Mod N. This will only possibly occur when N = p, a prime.
For example, let's look at 1/21 = \overline{.047619}
The powers of 10^x modulo 21 are 1,10,16,13,4,19,1...for x=0,1,2,3,4,5,6...
i.e. 10^6 == 10^0==1 Modulo 21, and the series has finished.
Thus the cycle will repeat for some numbers, say, 16/21 = \overline{.761904}
But, of course, since there are only 6 possibilities, some numbers will not cycle that way, for example we have 2/21 = \overline{.095238}