Inputs array from file(s) and performs various functions, outputting to file.