Replace parts of marshaller responsible for lists/arrays with AOT-friendly logic. Use generics where possible