Edit button on content which users have permissions to edit, including their profile
Contextual Links are a Permission that can be enabled for different roles via admin/people/permissions. If enabled, it will only show the options that user has access to. 

If I wanted to add my own custom buttons in different situations, I'd start with Display Suite which allows me to create custom fields (which might be my buttons) and show/hide those buttons based on View Mode, content type, etc.