Anatomy of single-field inflationary models for primordial black holes