determines if array is arithmetic or geometric