Set array length based on first entry