Electrical programmable multilevel nonvolatile photonic random-access memory