Your new layer and the Flux Dense layer are both defined to operate on ::AbstractArray, however your data generating and batching creates tuples of ::Float64, not tuples of ::AbstractArray. For this example, you can
dataset = [([a], [b]) for (a,b) in zip(x, y)]
You should also check out Flux.DataLoader.