most functions added to array.c, program almost done