> I only know of two languages, Pascal and Haskell, that are sufficiently flexible.
Julia, Fortran, some BASICs allow custom integer ranges.
Ada allows you to use any discrete range (integer, character, enums).
https://en.wikipedia.org/wiki/Comparison_of_programming_lang... - A more comprehensive list
The two columns of interest are "Specifiable index type" and "Specifiable base index".
Older versions of Perl allowed you to set a lexically-scoped array base integer. It defaulted to zero and the docs mentioned 1-based arrays, but IIRC it could be any integer. This was deprecated several years ago in 5.12 as a harmful practice. Specifying using features of a Perl version of 5.16 or newer actually makes assigning to it (except for 0) a compile-time error.
Interestingly, though, Perl’s native arrays are decidedly not an array of primitives. They are arrays of scalar values, and a scalar value can not only contain a character, a string, an integer, a float, or a reference to another item (scalar, hash, array, blessed object, filehandle, etc) but it can return different values when called in a numeric context vs a string context. There are certainly ways to get at primitive values, but it’s not in Perl’s native array semantics.
Non-default lower bounds in Fortran are a famous pitfall, however; they don't persist in many cases where one might think that they do, and are not 100% portable across compilers.