Changing a user from being linked to a login to being without login
There is no method of directly altering a user to be loginless.  Having said, you could simply drop and recreate the login:

DROP USER foobar;
CREATE USER foobar
WITHOUT LOGIN;


Of course, you'd want to gather details about what rights the user has prior to dropping it, so you can recreate those permissions after the CREATE USER statement.

Attempting to connect a loginless user to a login, via the following syntax:

ALTER USER foobar
WITH LOGIN = foobar;


Does not work, contrary to what I reported here previously.  That attempt results in the following error:


  Msg 33016, Level 16, State 1, Line 5
  The user cannot be remapped to a login. Remapping can only be done for users that were mapped to Windows or SQL logins.