Chains of gold atoms with tailored electronic states