As an enlisted member, you belong to the United States Army, and can in theory, switch MOS's regardless of what role it is.
As an officer, while in rare circumstances you can switch branches, you belong to either the infantry, signal, military intelligence, cyber, armor (includes scouts), aviation, etc.
Officers belong to their branch until they become a General. Hence they are a "General Officer" and no longer belong to a specific branch.