Mapping twist fields to local operators via tensor networks