買ってきた ('bought and brought back') uses ~てくる to mark the action as directed toward the speaker's sphere — the friend went abroad, bought dolls, and brought them back. This entire phrase is a relative clause modifying 人形. 全部 ('all of them') emphasizes completeness.