Is this straight-up track or will it need to be road-worthy? If road worthy,

will it be a daily driver?

Will it need to pass emissions?

What did the 351w come out of and how much of the original engine do you have like assys/brackets, sensors, intake track, water pump, ignition, etc

What are the engine mods you have planned if any? Being you are going 351w instead of a modded 302, my guess is you have plans for it that are beyond what a 302 H/C/I and stroker can handle. Otherwise, you are putting a lot more bulk in than you need. 351w deck height is higher than 302s so they take up more engine compartment space which is more chance for interference.

Add to this, I know nothing about BMWs or what an E36 is. Just doing a google-search, I see what they look like, but I can't get a gauge on what years they are available. So knowing what year E36 might give us some insight on more questions...things like:

Does it have an electronic dash or do you care that it might have dead instruments?
If it's 96-newer, are you trying to maintain the OBD-II port (i.e. for emissions)?
Does the stock fuel pump have to be controlled or is it/can you install a traditional single-speed pump?

Depending on the answers, my thoughts might change. But just taking a stab at what would be simplest and work best, I'm thinking 94-95 Mustang EEC and harness (CBAZA) from a manual GT. But I say that only because I'm woefully unfamiliar with the newer EEC-V stuff...and by newer, I mean the 96-01ish era strategies. However they've been around long enough there's decent support for them too. So if you just already have a Merc Cougar that you can pillage from, then that might change things.

it needs to mantain the obd ii port because i would like to daily it and it needs to pass emissions, not sure what the motor came out of but i basicailly just have the long block. i plan to turbocharge it and make about 500 - 600 hp. dont really care about instruments.

Maintaining the OBD-II pushes you to an EEC-V which was introduced about the same (1996) time OBD-II became a requirement. There were a few early adopters like the 95 Rangers which were EEC-V and OBD-II. That's the only early adopter I know of.

It's going to be important that you get some info about the 351w you have so you know what sensors and ignition components will be reusable and what will have to e replaced with components compatible with your EEC. I don't think any of the EEC-Vs were capable of running TFI distributors (gray or black). For others, if I'm wrong on that, please clarify the years/models/EEC strats/EEC codes that supported TFI. Assuming I'm right on this, you'll be required to have coil packs, a crank position sensor, crank balancer with a star-wheel to excite the crank sensor, and a cam position sensor to go where a distributor would go. The cam sensor is what allows for Sequential EFI, but even if you don't care about SEFI, you still need something there to drive your oil pump.

It's because of these complexities that I almost recommend people to seriously consider a 302 block stroked to 347 with H/C/I and booster. Stock 302s should be good to around 500hp if you don't detonate them. But that's hitting really close to their splitting point. And when the go, they split right down the valley. I think there's been a few people capable of getting 600hp from a stock block but that was with some luck and serious tuning to prevent detonation. I also suspect it was an 80s era block, not a 96-01 Explorer 302 block which weren't made of nearly as good of metal...at least according to my machinist.

The HPs you are wanting are where people start opting for a 351w or aftermarket 302 block. Dart 302 blocks should be able to get you to that point, but now you are talking H/C/I, block, headers, and turbo, which gets you square in the heap-big budget area.

The 351w was only offered in the trucks and the Cobra R, that I can recall. Again, there might have been some 96-newer vehicles that came with 351w engines. If you can find them, I'd say your best bet would be to get a wiring harness and EEC from one of them...and maybe other components too such as intake, intake track, sensors, etc. As for preserving your OBD-II, that's almost certainly going to be a custom wiring job. Any engine wiring harness you'll find on eBay or a yard isn't likely going to include the dash wiring that has the OBD-II sensor still attached. So that'll be some research you'll need to do.

Also depending on the year EEC, I'm told the vehicle VIN numbers started getting hosted in the EEC. If your emissions test goes poking at the EEC and asking for the VIN, it'll need to match your vehicle, otherwise that, alone could fail an emissions test. So that's something else to research to find out of your vehicle's ECM, hosts a VIN. If it doesn't then it doesn't matter whether the Ford computer does or doesn't.

the block doesnt have any sensors on it it is just a bare block so i could use whatever sensors would work, and is it possible to switch to a different distributor to make it work because im not looking to use coil packs

That depends on your EEC's capabilities. The only fuel-only ECMs I'm aware of are specialty units like those intended to control CNG injectors. Those usually work, in tandem, with the car's factory ECM. In fact, the factory ECM "believes" it is controlling the injectors, but it isn't. Instead, it's the CNG computer actually doing the fuel injection.

Hopefully someone more familiar will think of a solution. But my guess is if it's EEC-V (i.e OBD-II), it's going to be coil packs at a minimum which implicitly requires the crank/cam sensor stuff to make all that work.