I'm no fan of 1-based indexing either, but for these use cases it's not that hard to add a function to adjust the indexing for you. For example: a mod1() function that will adjust mod to 1-based indexing, and then using mod1 instead of %.
Same goes for indexing, you could write some functions like idx2(x, y, width, height), idx3(x, y, z, width, height, depth) that would compute the 1d index for you instead of using y*width+x (or the equivalent form adjusted for 1-based indexing) like you normally would.