decode arguments as array

fixes #5670 

@karlitschek @icewind1991 @bantu THX