i want to make arpeggios longer (so that they overshoot the chords a
bit). I've modified your offsetBeamPositions function to work on
Arpeggios instead of Beams (that was easy), but i'm quite surprised to
find that it doesn't work correctly with cross-staff arpeggios. Do
you have any ideas why? Maybe this is a bug in LilyPond?
This isn't a bug: cross-staff arpeggios belong to a different context. In your case, they are a part of PianoStaff, so the override will have no impact. If you do this, it will work: