Yes you can do that of course. I guess what Greg ment is more that you cannot create any control out of nothing with infopath you can however append new childs to an existing node, see this for example for a repeating section:
string myRepeat = thisXDocument.DOM.selectSingleNode("my:myFields/my:Result/my:Results").xml;
IXMLDOMDocument oXml = thisXDocument.CreateDOM();
oXml.async = false;
oXml.loadXML(myRepeat);
IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode("my:myFields/my:Result");
parentNode.appendChild(oXml.documentElement);
But anyway if your repeating table/section is bound to a secondary datasource (database) it will expand automatically.
Does this help ?