Cart before the horse.
You can create a variable that holds a connection string and then use an Expression to apply that to a ConnectionManager's ConnectionString
property.
By default, you won't be able to set the expression on an SSIS Variable based on the value of a Connection Manager's Connection String. It's simply not exposed in the Expression Editor. You can kind of, sort of, get the Connection String by using a Script Task. From there, you can access all the properties of a Connection Manager and interrogate it to determine the connection string.
Unless it has a user name and password in there. The password is sensitive information and I ASSUME, and all that that implies, that you won't be able to pull that bit of data in. If it's an SSPI context then yeah, should be no problem to assign that value back to an SSIS Variable.