Don't use array_fill for full array

When last array returned from array_chunk is full, array_fill is called with 0 as num argument, which causes fatal error. Additionally I've changed doc fill parameter, as other types are accepted as well, and added unit test.