Higher spin fields from a worldline perspective