It is not causing the "objects" to have global settings. Using an Array modifier created duplicates of the base object, but they all belong to the same object, i.e. the object is the union of all duplicates together. So they all have the same "global" settings because it is a single object.
The Generated coordinates are going from (0, 0, 0) at the front bottom left to (1, 1, 1) at the back top right of the object's bounding box. But note: as long as the Array modifier is still in use, only the base object's bounding box is taken into account for this. Those instances outside the original bounding box get negative values < 0 or values > 1 assigned (depending on the direction in which they are outisde the bounding box), but since the the Color Ramp input is clamped to the 0 to 1 range, lower values will be limited to 0 and values > 1 are limited to 1.
Here an example only regarding the Z values, the Generated coordinates have a range of 0 to 1 over the bounding box of the base object:

But if you would apply the Array modifier, the duplicates are no longer procedural and become a real mesh, so that the bounding box now includes the complete geometry:

A different result you will get when using Object coordinates. They are (assuming you have no unapplied transformations on the object) according to the global coordinates, here the base object has a height of 2 m centered on the world, so it spans from -1 m to 1 m and so are the Object coordinates. Applying the Array modifier will make no difference in this case, since the coordinates are not relative to the bounding box and so the gradient will always look like this:

If you now want the gradient to be the same on each instance of the base object - for example, similar to the Generated coordinates with respect to the bounding box of the base object - you can do something like this:
View the object from the side, go into Edit Mode and select all with A, then hit U and choose Project from View (Bounds):

This way you basically recreate something like the Generated coordinates (but only in a 2-dimensional plane which is totally fine if you want a gradient in one direction) and the (Bounds) option ensures that the object exactly fits the UV map in width and height:

But the good thing here is, the coordinates do not rely on the actual geometry's bounding box but are "stored" in the UVs, which get duplicated together with the mesh. So each instance of the base object inherits the same UVs and therefore the same gradient. The only thing I have to change here is now using the Y output of the Separate XYZ node because UVs only have XY coordinates. They keep those UVs even after applying the modifier, so the result will be the same:
