Modifiers array and curve
Instead of array and curve on a plane, you could use a "straight" simple curve as a bevel object of your main curve, as shown below:





to animate the "shape" to follow the "curve", with all straight angles, you could just animate the start/end bevel factors, es:



subdividing the "path" curve more, in particular near the corners, will give more control on how the tip/end of the shape will follow it.