I find that this is possible given certain constraints.
If you are not using the Array Modifier to scale the object.
If your object's coordinates do not intersect each other over the axis you're wanting to use.
For example, in my test scene I have an array of 5 cubes that do not share any space on any axis of the coordinate grid.
This way we can make it repeat without overwriting a portion of the previous object. You only need to clear the object on the axis you want to use for the shader.
I found a pretty robust way to do this is to use an Object Offset for the Array Modifier.
We can start with two Texture Coordinate nodes to reference both the Cube and the Empty, and Subtract their Object Coordinates. We then need to Vector Math -> Divide this result by 2 in theory, but in practice it's better to divide by some value slightly larger than 2. I used 2.0001 which is truncated to 2.000 in the UI, but it's important to know because it solves some floating point precision stuff that can pop up.
And it generates this intense white color, which is at first glance not very useful to us, but now we can use either the Vector Math -> Modulo OR Wrap node to make the Cube's Generated Coordinates repeat over the distance between the Cube and the Empty on each axis. Maybe someone with an advanced math degree can take this even further.
SO... to answer the actual question, finally, it's all of that, and then your subtract operation.