Cellular automata dynamics of nonlinear optical processes in a phase-change material