Array modifier make unwanted offset
Where is the &quot;offset&quot; coming from? It is built in as part of object, the mesh is not aligned in the $X$ axis. The array modifier will only repeat that offset as well.
There are two basic options:

Rotate the object in edit mode so that the object is aligned on the $X$ axis



In the Relative offset parameters of the array modifier, play with the values on for the $X$ and $Y$ axis until the objects align. Note that by doing that the object will still not line up to the $Y$ Axis. But maybe that is what you want? I don't know.