Ionic tuning of cobaltites at the nanoscale