Add runtime.maxArraySize and assertions on array size
fix Array.clone