array_index_calc
const char *array_index_calc(const char *n, bool *arrayp, int *valp);
n = array_index_calc(n, &array, &val);