Learning Sampling Dictionaries for Efficient and Generalizable Robot Motion Planning With Transformers