Binarity, activity and metallicity among late-type stars - I. Methodology and application to HD 27536 and HD 216803