WMA link
CoefficientArrays
CoefficientArrays[1 + x^3, x]
CoefficientArrays[1 + x y+ x^3, {x, y}]
CoefficientArrays[{1 + x^2, x y}, {x, y}]
CoefficientArrays[(x+y+Sin[z])^3, {x,y}]
CoefficientArrays[(x + y + Sin[z])^3, {x, z}]