Generating customized signal in Ltspice
Your best bet is to generate a PWL time/value file externally in something like Excel/R/Python/Text Editor or whatever you are most comfortable using.  Note that you need to specify finite rising and falling edge times for your clocks by having two points associated with each edge.

If you look at the Importing &amp; Exporting PWL Data documentation at Linear Technology's site, it describes using a file of time/value pairs to drive a PWL voltage source.