How to set environment variable for another user?

You can access through the registry. Modify the \Environment\Tmp key in HKEY_Users\<their SID>

Here are two solutions for getting the account SID

$User = New-Object System.Security.Principal.NTAccount("domainname", "username") 
$SID = $User.Translate([System.Security.Principal.SecurityIdentifier]) 
$SID.Value 

or

Get-WmiObject win32_useraccount -Filter "name = 'username' AND domain = 'domainname'"