The obsequies of someone very senior or very important like the royal family are planned years in advance. They have to be - look at the shambles that followed Princess Diana's death.
I would imagine that there are already a full set of funeral plans and sets of news items and tributes prepared for use when Prince Charles dies and which will be revised regularly, plus ouline plans for every other member of the RF.
It is like all the obituaries that immediately get published after the death of someone famous. I bet all the tv channels and all the newspapers have full obituaries written and programmes planned for when any of our Prime Ministers, present and past, die, ditto for US Presidents, or anyone.
Newspapers used to have obituary editors, they probably still do, whose task was to keep huge libraries of pre-prepared obituaries for anyone who had done anything noble or remarkable, or were at the top of their profession, or done anything that notorious or that had caught the public eye. These obituaries are revised regulalry and included tributes from friends and family
Plenty of peoplpre plan funerals, why not plan the public events and tributes to someone famous.