Sushain,
The behavior you describe around the 0th instance is strange but, regardless, I think an element() expression is not the correct approach here. Mocking things up a bit...
$ mkdir -p /tmp/terraform && cd /tmp/terraform
$ cat << EOF > test.tf
variable "instances_as_output" {
default = "i-94834,i-98454,i-98342"
}
EOF
$ terraform console
> "${split(",", var.instances_as_output)}"
[
i-94834,
i-98454,
i-98342
]
> ^D
To get a List of instance IDs from your join()-packed output, which I've mocked as the variable 'instances_as_output', we simply take the result of the split() function as shown by 'terraform console' above.
The Terraform AWS Provider Resource 'aws_elb' has a field 'instances' which then accepts an array:
https://www.terraform.io/docs/providers/aws/r/elb.html#instances
I think its just a matter of passing the results of our split to the 'instances' attribute.
Does that make sense?