This just occured to me, but in the anime for XY, Bonnie gets a Zygarde Core as a pet/pokemon, and later(I'm pretty sure it was in a movie.) it goes into complete form, but at that point in time(I'm not 100% sure, but like 99% sure.) Zygarde Cores and Cells didn't exist, in the games, only in SM and USUM(not sure if it's in SWSH) So does that mean that Game Freak had already pre-planned/hinted at the Zygarde Cells and Cores, prior to the SM release. Sorry if this question sounds stupid that I didn't realize this till now, or if I am completely wrong and there were Cells and Cores in XY. Thanks to all who help!
Let's see here...
According to Wikipedia:
The titles began development following completion of Pokémon Omega Ruby and Alpha Sapphire
Source
Omega Ruby and Alpha Sapphire were released in November of 2014
Bonnie finds Zygarde in the 1st episode of XYZ, which aired in Japan in October of 2015.
Zygarde Cell, Zygarde Core, Zygarde 10% Forme, and Zygarde Complete Forme were announced in the October 2015 issue of CoroCoro magazine
Here's an image.
This all means that Game Freak did in fact have Zygarde planned for Sun and Moon.