Unified treatment of Artin-type problems