New method: toArray
Refactoring: use toArray in tests
Refactoring: non-recursive implementation for arithmetic operations