Use the NumberGenerator for getArrayValue

This class can be used as a random number generator in other libraries
in order to provide the ability to mock the generator for tests.  Except
that this one method didn't use the number generator and therefore
wasn't affected by a mock number generator.