core: expand arrays for vararg arguments
core: fix type inference and const inline for arrays