Small populations lose overall genomic diversity but can maintain adaptive potential