My understanding from online search is that this is device dependent and that the index (if readable at all) could usually only be read on a locked device.
Maybe you might consider to try variants of fastboot getvar
to try to find the NAME
given to the index, and then its value.