"Any time you score 10 runs off three swings of the bat, I'll take it," manager Ned Yost said.
"I like it when everybody hits bombs," Perez said.
The victory was the 10th in the last 13 games for the rampaging Royals.
Among other things on this eventful evening:
• The Royals hit a grand slam and a three-run homer -- by Aoki and Butler -- in the same inning for the first time in franchise history.
• Left fielder Alex Gordon got the 1,000th hit of his Royals career.
• Aoki hit the first grand slam of his career and his first homer for the Royals.
• The Royals had their biggest inning of the season, eight runs in the fifth.
"It was awesome, it just shows you what our offense is capable of and I just feel like we're going to get on a roll from here," said winning pitcher Danny Duffy.
Perez jolted the Royals into a 3-1 lead in a hurry during the third inning, following Alcides Escobar's single and Aoki's walk. Perez teed off on a 2-0 pitch from D-backs starter Wade Miley and dropped it into the left-field seats.
The three-run blast was Perez's 13th homer of the season, tying Mike Moustakas for the team lead.
Butler and Aoki each went deep during the eight-run fifth, a mighty muscle inning for the Royals and a mighty messy inning for the D-backs.
Singles by Infante and Perez, his third hit, preceded Butler's bomb into the left-field seats, his sixth homer of the season.
Then came Gordon's 1,000th career hit, a single, followed by a walk to Lorenzo Cain and the second out. A wild pitch enabled Gordon to score and Cain to take second as he escaped a rundown.
"Cain set the whole inning up when he was so aggressive on that play," Yost said. "He did a great job of getting to second base and allowing that to happen."
Escobar was intentionally walked and Duffy swung and missed strike three, but was safe at first on another Miley wild pitch.
That loaded the bases and got Miley lifted in favor of Bo Schultz. His first pitch to Aoki was belted by the little right fielder over the right-field wall. He had gone 338 at-bats since his last home run for Milwaukee in 2013.
"I'm very happy, it's one of the best feelings in the world." Aoki said of his first career slam.
"It was a fastball. I wasn't sure when I hit it. I knew I hit it pretty good, but it was kind of a low line drive so I wasn't sure it was high enough to get over the fence."
With an 11-1 lead at that point, Yost had Duffy pitch the fifth inning and then excused him for the evening. At that point, he'd given up just three hits and one walk, but had made 94 pitches.
"My mindset today was I wasn't going to take Danny much past 100," Yost said. "We had the big lead and guys down there that hadn't pitched in a while."
So Jason Frasor pitched an inning, Francisley Bueno two and Aaron Crow finished up with one. The second run came off Bueno.
"I know if the game's a little closer, I'm back out there for the sixth, but I completely understand why I came out," Duffy said. "If I'd kept my pitch count down earlier, I'd probably get another inning."
A nutty number: When Duffy left the game in his previous eight starts, the Royals had scored a grand total of eight runs for him. They got him that many in just one inning of this outing.
"Just not a good night for us all around," D-backs manager Kirk Gibson said. "We didn't pitch good, we certainly didn't play very good defense and we didn't hit."
The Royals went into the game with a Major League-low 62 home runs. This was just the third time they'd hit three in one game.
"Hopefully we're going through another good stretch for us offensively," Butler said. "We've been kind of inconsistent, we've been kind of streaky but hopefully we're figuring it out and coming together as a team. Time will only tell that."