I want to make the effect similar to an infinite mirror without using glass surfaces because I need a transparent object without a background. I have an object with an Array modifier, but I don't know how to make the fall-off transparency effect.
Try replacing the Color Ramp node by a Map Range Node.
The only thing you need to connect that into is the Principled BSDF's Alpha socket, to get a transparency.
Alpha just takes a float value from 0 to 1. If you feed a color data, it will only take its "Value" (as in Hue Saturation Value) and ignore any Alpha channel. So it doesn't make sense to use a Color Ramp with semi-transparent swatches. If you really want to use a color ramp, set the color swatch to HSV and use different color values (shades of gray).
Now instead of using the Generated texture coordinates, I would try to generate a different value for each instance stored in vertex color, and use that in the shader. So that each instance has the same alpha. You can see such a setup there: