COP. This one covers the freaky play where, for example, an interception in the EZ is then fumbled in the EZ, but the ball rolls into the field of play, but then is batted by B back into the EZ. The results of this play, due to the bat, is a safety versus a touchback, so they don't want to give them the 20yd line as the basic spot.
In B, it's a COP in the field of play.
Keep in mind, it doesn't matter where the foul occurs for this. First step is ALWAYS, as you are doing, find the basic spot. So, review the play to determine that. Where the foul occurs NEVER determines the basic spot...only the type of play does that. These are awkward because they are plays that have no neutral zone (after change of team possession).
The simple way I remember it is understand the simplicity of A. COP in EZ and results of play is TB, then basic is 20yd. Everything else involving EZ after COP has goal line as basic spot. (exception: momentum, which is completely different topic)