Refactor saveArray interface