Chocolate bar making
I'm not sure I understand your question 100% correctly. So forgive me if I answer not what've asked.

Straight to "is there a way to duplicate the action...?"
&#8679; ShiftR is your friend when you've just done something good to a face (edge, vert, multiple selection...) and would like to do the same to others. Just select the next part and hit the shortcut. Big time-saver indeed.

And as the topic suggests let me give you my advice on actual chocolate bar design (who can stand tempted with chocolate :-)).

As suggested by m.ardito you could go with arrays too.
But my favourite for this kind of models is cube-modelling + edge-loops + inset faces. Very quick, in fact.
Don't forget to choose Individual for Inset faces and play with Depth (hold Ctrl). Then adjust by scaling on separate axes with Individual origins as pivots.



With this I really wanted to demonstrate that you don't necessarily need to repeat some action if your model is by-nature very homogenous.