Here is how I think it works. Someone correct me if I am wrong.
Corps, unless they are actually inside an army stack, are not "attached" to any army. Corps outside an army stack, even if in the same region as an army or armies, are considered independent. Independent corps still march to the sound of the guns (MTSG) to battles, whether in the same or adjoining regions.
The main value in placing a corps inside the army stack (thus "attaching" them to that army) is that they are likelier to join combats, both in the same region or if they MTSG. Armies engage at a higher chance than corps. Army stacks also allow you to fully utilize some of the special abilities - some corps commanders special abilities apply to all elements of the stack they are in, and so if you have a corps commander with a good special ability, placing them inside the army allows the whole army to benefit. As an independent stack, the corps commanders special ability will apply only to elements of the stack they are in. There are occasions where you want to have independent corps stacks, e.g. to cover empty areas of the front, as a rearguard to let more damaged troops escape, or for some other clever reason.