Add functions to sum 2d array, average the elements in a list and to create a 2d grid.