Dynamo-driven plasmoid formation from a current-sheet instability