The UI code assumed buttons had no more than 4 elements however Python scripts may define larger array sizes. Resolve the bug by adding functions for array access that take an array size limit to prevent buffer overflows (read & write). Note that this only adds the "float" versions of these functions, for completeness int & boolean can be supported as a separate commit.