What missions do I have to play to collect all the Bobbleheads in Fallout 4?
Solution 1:
If you look at the bobblehead's location, you can see that all of them are located inside freely accessible buildings or areas, except four:
The Perception Bobblehead is located in the Museum of Freedom, and is accessible during the quest "When Freedom Calls", which is the third quest in the main storyline
The Charisma Bobblehead is inside Parsons State Insane Asylum, which can only be accessed when you start the side quest "The Secret of Cabot House".
The Speech Bobblehead is inside a vault, in the room you find a new companion during the quest "Unlikely Valentine", the fifth quest of Act 1. The room can only be accessed by killing a named NPC guarding the door, so is not available otherwise.
The Energy Weapon Bobblehead is inside Fort Hagen. Sadly, it is located in a part that is only accessible through an elevator that is activated only by starting the quest "Getting a Clue", the sixth quest in Act 1.
So in order to get all bobbleheads, you would need to go through the main storyline up to the sixth quest and complete the non-affiliated quest from Cabot. You would still be in Act 1, but the main story line would be pretty much engaged.
Solution 2:
I have collected all of the Bobbleheads. Here are the missions I needed to play through to collect them:
Strength bobblehead - no missions
Perception bobblehead - start, but not finish When Freedom Calls
Endurance bobblehead - no amissions
Charisma bobblehead - complete Special Delivery & Emogene Takes A Lover - start, but not finish The Secret of Cabot House
Intelligence bobblehead - no missions
Agility bobblehead - no missions
Luck bobblehead - no missions
Barter bobblehead - no missions
Big guns bobblehead - no missions
Energy weapons bobblehead - complete Unlikely Valentine & Getting a Clue - start, but not finish Reunions
Explosives bobblehead - no missions
Lock picking bobblehead - no missions
Medicine bobblehead - start, but not finish Hole in the Wall
Melee bobblehead - start, but not finish Curtain Call
Repair bobblehead - no missions
Science bobblehead - start, but not finish Vault 75
Small guns bobblehead - no missions
Sneak bobblehead - no missions
Speech bobblehead - start, but not finish Unlikely Valentine
Unarmed bobblehead - no missions
Solution 3:
I would expect that you must play through the story missions in order to get all of the bobbleheads.
This is demonstrated early on when you first meet the Minutemen in Concord, the door on the top floor of the Museum of Freedom is locked, and in the room behind that door is a perception bobblehead. This is the room in which you first meet the Minutemen and in order for them to unlock the door for you to get into the room you must clear out all of the raiders in the building.