To achieve a globally unique numbering for samples and VCF header
fields, added a simple Sqlite table which maintains this numbering. See
file samples_and_fields.sqlite. Pass this sqlite file as argument to bcftools
view to produce the csv file for TileDB.
./bcftool view -O t --sqlite=<path_to_sqlite> -o /tmp/out.csv <input_vcf>
To compile bcftools, your system needs to have the sqlite3 library
installed. On RedHat like systems, this is the package 'sqlite-devel'.

WARNING: If you are running multiple instances of bcftool view, make
sure the sqlite file is located on a local filesystem (and not NFS) for
which file locking is correctly implemented. See
http://www.sqlite.org/faq.html#q5 for details.