Added recursive array-building method

Copes with arrays of arbitrary size