In principle, there are two things you need to construct:
(1) embedding matrix
(2) word2index dictionary
I don’t think gensim provides a full word2index dictionary directly, which I am not quite sure
Typically, if you are training small corpus, you don’t have to use the whole embedding matrix, because pretrained embedding matrix is very big, which slows your training. What you can do is to extract part of the embeddings and construct the word2index dictionary meanwhile.
Here are my recommended steps:
(1) Construct a vocabulary for your data,
(2) For each token in your vocabulary, query gensim to get embedded vector, add it to your own embedding matrix, and add the token to your own word2index dictionary (note that the index is not the original index in gensim)
(3) Use the word2index dictionary to translate your (text) data to indices.