Optimization-based synthesis of time-modulated arrays with accurate time-frequency analysis