It's really separate actions. Forming a battle group and then determining whose command it will be under. Command assignment is only done in the command phase prior to the AM turn. If it is not in the right Corps command boundary area then it will become out of command and have 1/2 movement. Probably better to move it to the corps boundary before forming it and assigning it command.
I so no provision though that prevents you from assigning one corps' assets to another corps.
There is no restriction when assigning Corps Assets, but heed the following - a Corps may have up to 24 asset units under its command (you can have more, but they will not be useable as they are out of command). An Army may have up to 12. One TD (towed or SP) and one Tnk Bn may be attached to each division in the corps (these then do not count against the 24 unit Corps limit or against the six unit division limit). A division may have up to six other units attached to it, with no more than four being battalions. So in theory you could attached up to four more asset battalions to a division. The problem is that artillery attached to a division then operate as though they were organic to that division. Thus artillery assigned to 2nd Inf Division cannot be used with another division's spotter unless that spotter is in PA mode, and even then, only two division's worth of artillery can barrage in a single barrage. You lose flexibility when assign arty to a division and not the corps. You also eat up the capacity to attach a separate regiment or combat command to a division if you have attached arty units to that division.