i read it somewhere in Hearbeat datastore election first preference is given to the VMFS datastore and even the VMFS from two different storage array. My question is if more than two storage array's are visible to all the esxi hosts in cluster then how the preference is given to storage array for electing the heartbeat datastore?
Some notes: You can infer from below points, it will lead to answer @ your question.
1. vCenter Server automatically selects a preferred set of datastores for heartbeating. This selection is made with the goal of maximizing the number of hosts that have access to a given datastore and minimizing the likelihood that the selected datastores are backed by the same storage array or NFS server.
2.A datastore might not be chosen if it is on the same LUN or the same NFS server as datastores that vCenter Server has already chosen.
3. the datastore might not be chosen if it is accessible to only a small set of hosts in the cluster.
Based on above notes, HA gives more preference to datastores from 2 different storage array over datastores from same storage array provided datastore is accessible from most of the hosts.
We can take input from Duncan as well: deeping