Initialize points array when using custom x() or y() functions

Points was undefined and causing errors to be thrown when push was called on it.

This could actually be improved slightly by preallocating an array of n elements since we already know how many we have.