Kind of how the 342-page US Patriot Act was introduced days after the September 11th terrorist attacks?
https://en.wikipedia.org/wiki/Omnibus_Counterterrorism_Act_o...
That much is obvious. Erdogan didn't start laying blame for problems on the "parallel structure" only after the coup attempt, he's been doing it for years. The coup attempt provided the political pretext for stronger action against the group (and, potentially, others that the regime can use the pretext of going after the group to deal with at the same time) than the regime thought it could get away with before.
Governments frequently use crises as pretexts for actions which they wanted to do previously but didn't find political support for, both against specific internal or external targets and in terms of general, non-specifically-targeted policy.
Edit: changed "quite likely" to "possible" to address valid criticism.
It is imaginable that the coup was staged, but it is not more likely than the other, more realistic explanations. In fact, it is still rather unlikely, even if one cannot rule it out completely.
That being said, as another commentator mentioned: These lists have existed before, since tensions have been going on for years. So now Erdogan just had to pull them out of the drawer.