Implemented Array functions: clear, mapInPlace, mapiInPlace, chooseInPlace, chooseiInPlace.