A WM can be turned into an IF with player instructions. Dribble More,Cut Inside, Cross Less and either Get Further Forward for attacking duty or More Risky Passes for Support.
A WP can be turned into an AP with the player instructions Shoot less, Cut Inside, More Risky Passes, Cross Less and also Dribble More if on attack duty.
As said earlier, starting formation is your defensive shape and your attacking shape comes from the player roles and duties.