Turn array functions into module

fixes #8