In the mid-twenties chapters, so many little nuances happen to foreshadow Bob Ewell's intentions that it is hard to know exactly what he will do. The greatest suggestion we might believe is that he would go after Atticus.
However, after Tom Robinson dies, Bob Ewell does say that this makes one down and two to go. So, having that one down in Tom, who could the other two be? One would assume Atticus is one because of how much a fool he made of Atticus, and Judge Taylor the other, for allowing the trial to go the way it did. Or maybe it could be Heck Tate.
The best way though to get Atticus would have been through these two little children. Who knows if it was really planned. For all we know, Bob Ewell was drunk and headed to Atticus. Scout and Jem together make two and that would indeed be an event foreshadowed and fulfilled.
In addition to the above answer, there are a couple other small things the Ewell does to others in the town which lead up to the night he attacks Atticus' children. First, he presumably attempts to burglarize or vandalize Heck Tate's house on a night he should have been at church. He succeeds only in tearing the screen. He also follows Helen Robinson home from work at a safe yet uncomfortable distance, muttering inappropriate things within earshot.
The night of the pageant it is interesting that neither Atticus nor Aunt Alexandra attend the event with Scout and Jem. The entire town, it seems, except Atticus and his sister are there. I think the purposeful setup of the kids walking alone at night is intentionally foreshadowing. Aunt Alexandra also mentions before the kids leave that "someone just walked over my grave." This is an expression - likely she got a chill - but it also showed that she sensed something bad was coming. She says it after the fact (the attack) that she should have paid more attention to her instincts earlier.
The fact that it is Halloween is a slightly cliche example of foreshadowing that something bad might happen. Then Cecil Jacobs jumps out to scare Scout and Jem on their way too the school that night. The entire chapter just seems to revolve around the build-up of small details that lead to the final climax of the actual attack.
In order to establish verisimilitude in their narratives, writers employ foreshadowing of later events. In this way, the reader is not surprised when the latter events occurs and the point of this event is, therefore, strengthened in its believablity.
After the trial of Tom Robinson in Harper Lee's To Kill a Mockingbird in which Atticus Finch has made the jurors and audience in the courtroom acutely aware of the duplicitousness of Mayella Ewell and the malevolent and inferior character of Tom Ewell, the craven Ewell vows revenge against Atticus for exposing his ignorance and baseness as a liar. One day outside the post office, Bob Ewell spits in the face of Atticus Finch, declaring that "he'd get him if it took the rest of his life."
This incident is the cause of much town gossip; nevertheless, Atticus does not dignify Ewell's insult by fearing the man. Also, not wishing the children to become alarmed, he assures them that Bob Ewell will never do any harm to them:
You know he wouldn't carry a gun, Scout. He ain't even got one--" said Jem.
"When a man says he's gonna get you, looks like he means it." [Scout says]
"He meant it when he said it," said Atticus. "...I destroyed his last shred of credibility at that trial, if he had any to begin with. The man had to have some kind of comback, his kind always does. So if spitting in my face and threatening me saved Mayella Ewell one extra beating, that's something I'll gladly take....You understand?"