Copper and metals gain as dollar weakens