array: added array functions and main file