Divides an array into 2 or more arrays given a ratio.