The size is part of the array type:
var a [3]int
var b [4]int
// a = b // Error: different types
[]int and []int are completely different types. You can't assign between them or pass one where the other is expected. This catches size mismatches at compile time.