Move C++/python array functions to separate file