Metapp.AccuSourceIndexed accumulator to build an array.
An accumulator of type 'a t can accumulate values of type 'a to build an 'a array.
add v a returns (i, a') where a' is the accumulator a followed by the value v. i is the index of v in a' (and is equal to the length of a).
length a returns the length of the accumulator a (the number of elements).