[Because linking to cool zsh features seems to be a hobby of mine…]
If you're using zsh for this you can access terminfo directly¹, instead of hardcoding escapes(for example, "echoti cup $snowflakes[$i] $i"²) or shelling out to tput. You can also use zselect to replace sleep. Extra points for "echoti smcup" to use the secondary screen when available, instead of wiping the screen.
¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...
² To be fair it would need a minor change to array structure, as cup is zero-indexed.
³ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...