I have curve and array modifier. Rotation and scale is applied to mesh and curve. The mesh is not following the curve (Square). Mesh getting mess with the geometry. As soon as curve modifier added the mesh get mess. Any suggestion or help. Thanks
Curve modifier wants to distort geometry. This is like having roads or cables, etc. However for such technique look at some addons for procedural modeling.
It will be deformed with array. But if all your pillars are completely same then is another thing u can do. Create a plane and make it as big as your curve.
Now subdivide it in such a way that each row contains the no. Of faces which are same as the no. of pillars for that row. For example, if u want 10 pillars in one row then the no. Of faces should also be 10. Now delete all the inside faces of the plane leaving outside border. Now parent the pillar to the plane and in the object properties of the plane enable instancing by faces. You r done.
Hope this helps