> I’ve only ever seen it done in pizza places that already have takeaway boxes available.
Most, if not all, restaurants have something they can drop leftovers into if you ask for it.
As someone who lives in Spain but is Swedish, I've never had any restaurant tell me "we don't have takeaway boxes" or "no, we won't do that" when asking to take my leftovers with me, neither in Spain or Sweden or any other country I've visited.