Peralta, who was set to be a free agent after the 2020 season, will now be under contract through 2022.
He hit .275 with 12 home runs and 57 RBIs in 99 games last season, which ended for him in August when he decided to undergo season-ending right shoulder surgery. The shoulder had been an issue throughout 2019, and Peralta had three stints on the injured list.
Peralta is expected to be ready for spring training. He won a Gold Glove in 2019 and hit a career-high 30 homers in 2018.
Ray, who was an All-Star in 2017, has been one of Arizona’s top pitchers over the past four seasons. He had a 12-8 record and a 4.34 ERA in 2019 and struck out a career-high 235 batters in 174 ⅓ innings.
The 29-year-old Lamb was an All-Star in 2017 but is trying to bounce back from two straight injury-plagued seasons. He hit just .193 last year with six homers in 78 games.