Given an airfoil and wing planform, what is the process to find the flap size and deflection necessary to give a certain change in CLmax? Flaps are usually sized as a percentage of the chord, with 0.2c to 0.3c being the normal range for most aircraft. But how do you find the length of the flaps spanwise?
This is to answer your follow-on question in the comment;
That answer did not cover the analytical method of determining CL change. I'm unsure what this iterative method is. Is the only method using CFD or wind tunnel testing? How were they sized before these technologies were available?
I feel the main question has been answered already here.
Flaps, especially the ones with gaps between the wing and the flap, depend a lot on how the boundary layer forms and when separation occurs. Therefore, CFD is still struggling to get everything right and wind tunnel testing is still needed at least to verify the computational simulation.
Before CFD, the average aircraft engineer would experience a number of designs in his (rarely her) lifetime which gave him a feeling what works and what not. Still, surprises were not uncommon and late fixes were needed to arrive at the desired performance.
If you desire to use a simple formula which precisely predicts the maximum lift coefficient, including size, speed, temperature, airfoil shape and manufacturing imprecisions: It does not exist.