You can keep tracks of number of cycles and run extras when counter matches. Something like this:
$array = array(1,2,3,4,5);
$i = 0;
foreach($array as $set) {
if(2 == $i)
echo 'after 2';
if(4 == $i)
echo 'after 4';
echo $set;
$i++;
}
I must note that this is more of PHP basics and really has nothing to do with WordPress. I highly recommend PHP documentation as first stop for such.