There are multiple addons doing things you're asking for:
Zolan's Junk Handler automatically marks junk based on your settings, and automatically sells junk for you, too.
Research Assistant automatically marks items with a colored icon based on their traits and what you have researched.
Item Saver allows you to manually mark items for any reason, and even has the option to filter the marked items from the NPC shops, deconstruction and research.