Add insertion sort functional test

These changes also explain why it is necessary to initialize
individual array elements to nondeterministic values.