Check array boundary for shape type