add support for multidimensional arrays

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
add support for static arrays

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
add overflow checks

Signed-off-by: Vicente Bergas <vicencb@gmail.com>