How do I make the shape of a Kinder bueno chocolate bar?
You're on the right track :-)

Start with a modified cube
Add an Array Modifier and a Subdivision Modifier (3-4 levels)
Use beveled Curve with Shrinkwrap modifier for the topping

(I took a small bite, sorry about that...)