The good news is they are the same as any Lookup. You just need to set the value to an object array:
var regObj = {};
regObj.entityType = "contact";
regObj.name = "John Doe";
regObj.id = "{3B23C3D4-6D37-E411-80CE-0017A477D448}";
Xrm.Page.getAttribute("regardingobjectid").setValue(regObj);