It depends on the particular style guide you are using—and where exactly these names are appearing.
For example, the MLA Handbook (8th ed.), says:
1.1.2 TITLES OF AUTHORS
If the name of the author of a source you consulted is given in the source with a title—such as Dr., Saint, or Sir—generally omit the title in the works-cited list. Similarly, a title should usually not be included when the name is mentioned in the text discussion.
Augustine (not Saint Augustine)
Samuel Johnson (not Dr. Johnson)
Philip Sidney (not Sir Philip Sidney)
Social titles are not used.
The Chicago Manual of Style (17th ed.), 16.40, also says to drop titles from names in indexes:
Academic titles such as Prof. and Dr., used before a name, are not retained in indexing, nor are abbreviations of degrees such as PhD or MD.
Similarly, social titles are not used.
However, Chicago does say this in 16.41:
Abbreviations such as Jr. are retained in indexing but are placed after the given name and preceded by a comma . . .
King, Martin Luther, Jr.
Stevenson, Adlai E., III
So, no titles of any kind are suggested by these style guides (Aside from Jr. and so on.) Other style guides may give other guidance.
If using these titles in a different context, and without a using a particular style guide, then the style would be up to you.
Should you decide to use a title, I expect common usage would put it at the end of the name, after a comma: Last, First, Title. (It would be particularly confusing for the presentation of sorted lists if the title were put first.)