format grid of integers
monkey patch Aray for calculating diagonals
src: https://gist.github.com/EvilScott/1755729