Blender array modifier changes material when applied
This is a procedural texture (not an Image?) If so, it will default to using the Generated texture space. The Generated space measures 0-1 along the sides of an object's bounding box. However (I think inconsistently?), if an object is arrayed, the space takes its scale from the bounding box of a single element. When the Array modifier is applied, suddenly 0-1 is measured down the whole, (now single,) object.
You could use a Texture Coordinate node to put the texture into Object space. Then, you may have to tweak its scale, but it will be consistent, always considering the space of the entire array in Blender Units, (assuming no object-level scale transform,) applied or not.