Trajectory optimization, as a key connected automated vehicles (CAVs) operation task, has the potential to mitigate traffic congestion, lower energy consumption, and increase the efficiency of traffic operation. This study proposes a decentralized approach to optimization CAV trajectories in both longitudinal and lateral dimensions along a signalized arterial under the mixed traffic environment, where human vehicles (HVs) and CAVs co-exist. More specifically, a 2-stage model is developed to optimize CAV trajectories based on traffic signal plans of downstream intersections and trajectory information of surrounding vehicles. The stage-1 is formulated to provide a rough estimate of the minimal travel time required for a single CAV traveling along this arterial with minimum stops. The stage-2 model is then designed to optimize the longitudinal and lateral behavior of CAVs with the objective of minimizing delay and lane-changing costs. This model is solved by a dynamic programming algorithm to satisfy the real-time optimization needs. A rolling horizon approach is adapted to dynamically implement the proposed model in light of changing traffic conditions. Numerical experiments have been conducted on a real-world arterial to evaluate the model performances. By comparing the optimized trajectories to the no optimization benchmark, the proposed model can reduce average stop delays of CAVs. Moreover, it can also reduce the stop delays of HVs and mixed traffic.