First off, look at this page from Chapter 16 of Naruto.
As you can see, even back then Kishimoto had already created Team Minato. Since Sharingan was introduced a chapter or two earlier it would be logical if Kishimoto already had the story for Team Minato planned, (including Rin's death)...