Averaging over codes and an $SU(2)$ modular bootstrap