A general formula for an arbitrary number of fruit types:
= LOOKUP( 1+MOD(k-1, n), accumulated, fruit)
where k is the number column to the left, accumulated is the count corresponding to the first fruit of a new type. For the problem as stated this was {1;4} but, when I inserted a couple of bananas into the list, it became {1;4;6} with a total count, n, of 10.
If you have the new XLOOKUP function, it will work with the final accumulated count for each fruit type {3;5;10}, in which case the formula is
= XLOOKUP( 1+MOD(k-1,n), accumulated, fruit, , 1 )