Array size calculation