Computes array dimensions.