In regards to Petry, I think the best landing spots for him are Dallas, Nashville, Detroit and Buffalo all make a lot of sense. All of those teams have clear holes on RD or are interested in Pesce (meaning I think they'd be interested in Petry as a consolation prize).
The Penguins would likely have to add and/or retain salary on Petry, but getting a third team to send someone like Marchment, Barrie or Olofsson to San Jose while taking Petry would be an easy way to make the money work in this kind of deal.
Maybe something like this would work:
Penguins get Karlsson at $8.5 million (Sharks retain $3 million)
Sabres get Petry at $5.25 million (Penguins retain $1 million)
Sharks get Olofsson, Granlund, Smith's RFA rights, Pittsburgh's 2024 1st and Pittsburgh's 2025 2nd