Fix trailing commas in array literals changing the result of sizeof()

Based on the following SM fix : https://github.com/alliedmodders/sourcemod/commit/099f299113e534cf8cf982c5fb275c2a05856e50 since c++ code is not allowed. So I hope this is not too much dumb conversion and is correct.

This fixes also a crash (assertion) when 3d array with undefined size and trailing comma is used.

Tested with 2d/3d arrays with string and non-string values and this looks good.