Generate all Calendar.app icons I'd like to get all 366 possible icons that Calendar would have displayed in the Dock.

How can you automate the creation of each of these, either in Bash or Automator?
You should avoid using Apple's artwork for your own projects or where you need to re-distribute the files. Apple's legal department may have an opinion.

Rather than copy Apple's artwork, create your own. There are numerous collections of calendar artwork that you can build upon.

Use a scriptable tool like Gimp, Inkscape, or ImageMagick to create all 366 variations.