You could use something like
(x_1, i_1), (x_2, i_2), ..., (x_k,i_k), ... (first k tuples of value, index)
with x_n >= x_m for every n < m (tuples must be ordered by value)
than use the i index numbers from the tuples
edit: just saw there is a similar approach to this with sets in another comment.
Zepb t1_jbzdpqf wrote
Reply to [D] What's the mathematical notation for "top k argmax"? by fullgoopy_alchemist
You could use something like (x_1, i_1), (x_2, i_2), ..., (x_k,i_k), ... (first k tuples of value, index) with x_n >= x_m for every n < m (tuples must be ordered by value)
than use the i index numbers from the tuples
edit: just saw there is a similar approach to this with sets in another comment.