you probably want something like this:
object Host "host with webproxy" {
...
address = "x.x.x.x"
vars.tcp_ports = [ 3128 ]
}
apply Service "TCP Webproxy " for (port in host.vars.tcp_ports) {
...
check_command = "tcp"
display_name = "Webproxy ports 3128"
vars.tcp_port = port
}