Re-write c++ getColumn and putColumn to use templates

This reduces code duplication