I did this project for our wedding. It simulated lightning bugs in a mason jar, flashing at random intervals. We ended up making about 25 of these jars.
The custom PCBs each had an Atmel AVR Tiny controlling a TLC5916 LED driver. The firmware used a pseudorandom number generator to control when each LED would flash. The seed was written at compile time via the Makefile. Each time a board was flashed the program was recompiled with a new seed. With such a small run, this was the simplest way to ensure the patterns were different between all the jars.
The TLC5916 is updated every 125usec and the microcontroller sets the LED outputs using a PWM scheme. Every 16ms a new PWM "period" begins and the microcontroller turns on the LEDs that have a brightness greater than zero. Then after the correct number of 125usec ticks have passed each LED is turned off for the rest of the 16ms period. This allows the microcontroller to provide a PWM signal to control the brightness of each LED connected to the driver even though the TLC5916 doesn't support setting a brightness.
Using this PWM scheme a brightness waveform is played whenever an LED is activated by the pseudorandom number generator. The final product is shown in the video below.
If you would like to check out the code, schematics, or board layout they can be found on Github: https://github.com/eightdatabits/lightningbugsinajar