Time-modulated array antenna (TMAA) is a new type of array antenna based on time modulation technology. By introducing "time" as the fourth dimensional design freedom into the design of conventional array antennas in three-dimensional space, the array antenna has time modulation characteristics, which better controls the radiation characteristics of the array antenna and achieves the best far-field radiation pattern synthesis. This paper designs a Time-modulated linear array (TMLA) with low sidelobe level (SLL) and low sideband level (SBL) based on the chaotic exchange nonlinear dandelion optimization (CENDO) algorithm. Three optimization methods are studied: firstly, determining the optimal on-time (τnn) for each array element; The second is to determine the optimal on-time (τnn) and optimal uniform array element spacing (d) for each array element; The third is to determine the optimal opening time (ton), closing time (toff), and optimal uniform array element spacing (d) for each array element. To achieve simultaneous reduction of sidelobe level and suppression of harmonic interference. The same array model contains different harmonic frequency radiation. In this article, we only considered two harmonic frequencies, namely the first sideband frequency and the second sideband frequency. Because the harmonic of other sideband frequencies has a very small impact on the radiation of the fundamental wave, it can be ignored. To demonstrate the stronger ability of the CENDO algorithm in optimizing Time-modulated array antennas, and in line with the principle of fairness and impartiality, this paper also simulates different Time-modulated array models and compares the results of the CENDO algorithm with other published literature. It is concluded that this study shows lower SLL and lower SBL in different models. This provides a more scientific and accurate explanation of the superiority of the CENDO algorithm compared to other algorithms in the field of antenna optimization in electromagnetics. At the same time, this also provides great research value and fundamental support for designing high-performance Time-modulated array antennas in subsequent engineering applications.