Here's one. Do you really need to set it up as a 40-element matrix display? Strand lights usually don't. Common effects like the "racing" cycle tend to use sub-arrays tied to a common signal.
LEDs also don't need to be at logic high all the time in order to appear on. Even a fairly low duty cycle will usually look like it's persistently lit, but you'll start losing some apparent brightness if you go too far. Because of this, a common technique for arrays of LEDs is to set up an m x n matrix and strobe over it.