Add set_* interface for random-access sets.
(cherry picked from commit f0bc51188703b1faa2d08b21b2ae0433b2a73f36)
Switch from a_info accesses to artifacts_get()
remove unused variable warning